View unanswered posts | View active topics It is currently Tue Dec 10, 2019 5:39 am



Reply to topic  [ 6 posts ] 
Seed growing problem 
Author Message

Joined: Wed Mar 30, 2016 3:34 am
Posts: 4
Reply with quote
Greetings everyone, it is my first post.

I was trying to add a seed launcher in faction 6 that launches seeds which supposedly will grow into buildings but somehow failed. My launcher code (along with the seed) is as follow:
[Reveal] Spoiler: The code in blocks.lua
{56, shape=RECT_LAUNCHER1, name="Architecture Blueprints", features=LAUNCHER, group=6, points=15, durability=0.500, density=0.150, fillColor=0x113077, fillColor1=0x205079, lineColor=0x3390eb,
replicateBlock=
{57, command={faction=6}, shape=RECT_ROOT, name="Constructor", features=COMMAND|SEED|PHOTOSYNTH|THRUSTER|REGROWER, group=6, points=5, durability=0.250, density=0.150, fillColor=0xe0e0e0, fillColor1=0xffffff, lineColor=0x606060, capacity=150.000,thrusterForce=2000.000, thrusterColor=0x20ffffff, thrusterColor1=0x90ffffff, photosynthPerSec=0.500,seedLifetime=180.000, launchSpeed=50.000, launchLifetime=10.000, launchResources=5.000, growRate=1.000}, replicateTime=5.000, launcherPower=10.000, launcherSpeed=500.000}

and I am aware of the fact that you will need to add blueprints in faction 6 using the very block launched to make it grow. I added a few files named after 6_crop#.lua in my mods/ships folder, with # being a number (under the suggestion of a previous forum), each of then consists of blocks using the seed connecting to some regular square blocks of scale=1.

It just would not grow and is driving me mad for like, thinking and debugging for the entire week.

My problem here is:
1. Is my launcher code problematic? (I am confident of it being not true because the mod did not corrupt, and I can actually import the crops, or at least look at the preview of it since it does not contain a regular command module.)
2. Is my naming or placing of the blueprints wrong in any sense so that the system just cannot relate it to the seed? What exactly is the procedure of seeking for blueprints to grow into?
3. Is there any constrain on the crops intended to be grown, so that simply adding three normal blocks to the seed will not work?
4. Is it fine to use the SHAPE=RECT_ROOT for seeds? I believe I saw some mod using it (maybe the SALTS).


Sat Apr 16, 2016 9:25 am
Profile
User avatar

Joined: Wed Dec 09, 2015 10:19 pm
Posts: 406
Location: Earth
Reply with quote
I'm a little bit tired right now, but one problem could be the P value of the design~

_________________
"If the ai can do it player fights would be ruined.
If the player can do it the experience would not be the same.
Just leave the lone developer to his job and everything will turn out okay."


Image

Reassembly x10


Sat Apr 16, 2016 5:41 pm
Profile

Joined: Wed Mar 30, 2016 3:34 am
Posts: 4
Reply with quote
I tried four crop designs: one with four simple square blocks attached (so costs like 5 P each) and one with some defensive turrets on it (therefore costs a bit more P points), each I have the root block turned (so the distinction in sides should not be a matter). All of the four designs are put inside the ships folder so in theory (at least from what I believe) any which would work will make the seed grow.

I thought that any design having the seed block (on the edge) can do, even without the command module (like the plant faction crops); I also tested designs with command module, but since nothing worked yet, I am frustrated by the fact that I am unable to discover the problem.

Also, the faction 2 seed launcher is working fine, so the seed-seeking program is perhaps alright; it's just that I cannot figure it out.


Sat Apr 16, 2016 6:20 pm
Profile
User avatar

Joined: Sun Oct 11, 2015 6:07 pm
Posts: 49
Reply with quote
Can you post a mirror to the packed mod? I want to try to help but I'm too lazy to build a test building.


Sat Apr 16, 2016 7:29 pm
Profile

Joined: Wed Mar 30, 2016 3:34 am
Posts: 4
Reply with quote
Sorry for the late reply, I am currently unable to upload due to unknown internet problem. There is essentially nothing but the codes above and the codes below, for 6_crop#:

1.
[Reveal] Spoiler: 6_crop1
{blocks={
{57, {-20.192, 0.000}, 0.000, command={faction=6}},
{6010, {-12.692, 0.000}},
{6010, {7.308, 0.000}, 1.571},
{6010, {-2.692, 0.000}}}}

2.
[Reveal] Spoiler: 6_crop2
{blocks={
{57, {-20.192, 0.000}, 3.142, command={faction=6}},
{6010, {-12.692, 0.000}},
{6010, {7.308, 0.000}, 1.571},
{6010, {-2.692, 0.000}}}}

3.
[Reveal] Spoiler: 6_crop3
{blocks={
{6014, {-3.918, 13.333}},
{6014, {-3.918, -13.333}, -1.571},
{60101, {-2.251, -5.000}, bindingId=5},
{6034, {-9.751, 5.000}},
{6034, {-9.751, 0.000}},
{57, {-14.751, 0.000}, -3.142, command={faction=6}},
{6034, {-9.751, -5.000}},
{6038, {5.249, 0.000}},
{6026, {10.249, 0.000}, -1.571},
{60101, {-2.251, 5.000}, bindingId=5}}}

4.
[Reveal] Spoiler: 6_crop4
{blocks={
{6014, {-3.918, 13.333}},
{6014, {-3.918, -13.333}, -1.571},
{60101, {-2.251, -5.000}, bindingId=5},
{6034, {-9.751, 5.000}},
{6034, {-9.751, 0.000}},
{57, {-14.751, 0.000}, 0.000, command={faction=6}},
{6034, {-9.751, -5.000}},
{6038, {5.249, 0.000}},
{6026, {10.249, 0.000}, -1.571},
{60101, {-2.251, 5.000}, bindingId=5}}}

The blocks used are system-given except for block identity 56 and 57, which are given initially, so there should be no ambiguity in these codes. I am looking forward to more complicated design, but even the simplest testing fails again and again. RESPECT for all mod designer, especially after trying it myself. Apologize for the poor English, as for being a non-native inexperienced writer.


Sun Apr 17, 2016 2:03 am
Profile

Joined: Wed Mar 30, 2016 3:34 am
Posts: 4
Reply with quote
Thanks all, I guess I finally found the ill-posed part. The faction that the seed belongs to must be 5 in order for it to grow and the blueprints should be named under 5_crop# rather than 6_crop#. It is independent to the launcher group (even though I suppose you should still set the seed group to be the same as the launcher).

RELIEVED after fighting with those codes for days.

For anyone who is facing similar problems, feel free to ask, I think I understand how this work now.

EDITED: An interesting fact is that if you use the RECT_ROOT block as your seed, the sides actually matters. If the blueprint is of the wrong end, the seed will never grow.


Sun Apr 17, 2016 5:34 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software