Page 1 of 4

need help with adding new propulsion component.

Posted: 10 Nov 2006, 20:32
by Watermelon
I have changed the following files to add a 'new propulsion component' to the game:

propulsion.txt,propulsiontype.txt,bodypropulsionimd.txt,propulsionsound.txt in mp/stats/

research.txt,preresearch.txt,resultcomponent.txt in mp/stats/research/multiplayer/
names.txt in mp/messages/strings/

The source changes are finished too.(new 'type' for new propulsion,new 'script mask' for new propulsion etc etc)

I added a new entry in preresearch.txt to make sure the new propulsion item is 'pre-researched':

[my new prop name],R-Sys-Engineering01,1199

I am not sure what the 3rd value does,maybe Id or sumthing,I just added a random large number as the 3rd value,so it wont cause 'duplicated Id' problem.

The game loaded those datas successfully(no assert or abort or whatever),but the new propulsion just didnt show up in the design window for some reason.

Thanks.

Re: need help with adding new propulsion component.

Posted: 11 Nov 2006, 04:20
by lav_coyote25
would reading the 1.12 (source - for the wdg original )  from the  newst/pumpkin team help you?  they added some new units ( cyborg and other units.)  might be something in there that might help?  :-\

Re: need help with adding new propulsion component.

Posted: 11 Nov 2006, 09:46
by Watermelon
lav_coyote25 wrote: would reading the 1.12 (source - for the wdg original )  from the  newst/pumpkin team help you?   they added some new units ( cyborg and other units.)  might be something in there that might help?   :-\
thanks I'll look for the 1.12 source code.

Re: need help with adding new propulsion component.

Posted: 11 Nov 2006, 13:56
by DevUrandom
1.12 sourcecode...

Re: need help with adding new propulsion component.

Posted: 11 Nov 2006, 15:35
by Watermelon
DevUrandom wrote: 1.12 sourcecode...
Thanks.  :)

Re: need help with adding new propulsion component.

Posted: 11 Nov 2006, 17:27
by Troman
Watermelon wrote: The game loaded those datas successfully(no assert or abort or whatever),but the new propulsion just didnt show up in the design window for some reason.

Thanks.
Maybe you have to use makeComponentAvailable() out of scripts (rules.slo for example) for it to show up.


First you add this line to rules.vlo:

Code: Select all

inScriptPropName		PROPULSION		"myNewPropulsion"
myNewPropulsion is the name of the propulsion as defined in txt files.

Then you add this to "initialisedEvent" event of rules.slo file:

Code: Select all

makeComponentAvailable(inScriptPropName, playerNumber);
You'll need a loop to iterate through all players with playerNumber.

Re: need help with adding new propulsion component.

Posted: 11 Nov 2006, 18:14
by Watermelon
Troman wrote: Maybe you have to use makeComponentAvailable() out of scripts (rules.slo for example) for it to show up.


First you add this line to rules.vlo:

Code: Select all

inScriptPropName		PROPULSION		"myNewPropulsion"
myNewPropulsion is the name of the propulsion as defined in txt files.

Then you add this to "initialisedEvent" event of rules.slo file:

Code: Select all

makeComponentAvailable(inScriptPropName, playerNumber);
You'll need a loop to iterate through all players with playerNumber.
thx I'll try to mess with the .vlo files a bit.

Re: need help with adding new propulsion component.

Posted: 12 Nov 2006, 17:09
by Watermelon
In rules.vlo:
myNewTech RESEARCHSTAT "R-Vehicle-Prop-VTOLH"

In rules.slo
playnum = 0;
while (playnum < 8 )
{
completeResearch(myNewTech ,playnum);


then it gives me this assert/error message:
syntax error at line 64 'completeResearch(myNewTech ,playnum);' in rules.slo
token 288 text 'myNewTech'


I think the assert/error message means 'myNewTech' is not declared.I also tried using the 'PROPULSION' variable + makeComponentAvailable() you suggested,but it gave the same assert/error message.

Re: need help with adding new propulsion component.

Posted: 12 Nov 2006, 18:33
by Troman
in rules.slo you have to add at the beginning of the file:

Code: Select all

public RESEARCHSTAT myNewTech;
should work after that.

Same with PROPULSION variable, if you are going to use it instead.

Re: need help with adding new propulsion component.

Posted: 12 Nov 2006, 19:58
by Watermelon
Troman wrote: in rules.slo you have to add at the beginning of the file:

Code: Select all

public RESEARCHSTAT myNewTech;
should work after that.

Same with PROPULSION variable, if you are going to use it instead.
It works now with that line added,thanks.

Re: need help with adding new propulsion component.

Posted: 16 Nov 2006, 16:13
by Watermelon
This is the propulsion I added,VTOLH or VTOL Helix

HC viper VOTLH:
[img width=300 height=225]http://img240.imageshack.us/img240/6633 ... 143sd2.jpg[/img]
http://img240.imageshack.us/img240/6633 ... 143sd2.jpg

Tri-lancer python VTOLH:
[img width=300 height=225]http://img220.imageshack.us/img220/1213 ... 153sw9.jpg[/img]
http://img220.imageshack.us/img220/1213 ... 153sw9.jpg

Tri-Bunkerbuster python VTOLH:
[img width=300 height=225]http://img220.imageshack.us/img220/8355 ... 160ih1.jpg[/img]
http://img220.imageshack.us/img220/8355 ... 160ih1.jpg

They look hilarious because they dont have a propulsion pie and I didnt rotate/invert the the turret like normal VTOL's,and they are too powerful(no need to rearm,flying,use the same weapons as ground units) and I am not sure if I should add such a feature to the game...

Re: need help with adding new propulsion component.

Posted: 16 Nov 2006, 16:33
by Troman
"Invisible units" special ability comes to my mind ;D

Re: need help with adding new propulsion component.

Posted: 16 Nov 2006, 20:34
by Watermelon
Troman wrote: "Invisible units" special ability comes to my mind ;D
hehe I think I saw a file called specialability.txt,but there were 3 lines in that file,the special ability is not finished too methinks.

Re: need help with adding new propulsion component.

Posted: 16 Nov 2006, 21:08
by DevUrandom
As I said earlier: I wouldn't add 3 turrets to any propulsion, whether it is ground or air... Simply too powerful and doesn't look that bright.

What came to my mind when I saw this: Maybe the front turret should be limited to "light" weapons, as chaingun, flamer or similar, to assist with balancing and stop it from looking a bit dumb...

On VTOLs with multiple turrets I wont generally say no, but the costs should be enormous... And with that I guess in the end they wouldn't be used that often by the player...

Re: need help with adding new propulsion component.

Posted: 17 Nov 2006, 15:55
by themousemaster
The HC viper VTOLH, AKA the "floating turret".  Reminds me of something out of a Stephen King story ;p.

Dev, was your suggestion about a light turret intended for all of his "multiple turret" designs, or just the ones from this thread?

Because for VTOL designs, I don't think a flamer would be a good idea (a flamethrower attached to a flying vechicle?)

In the case of VTOL's, I'd more assume that, perhaps, on a heavier chassie version, you could have a combination of 1 vtol "weapon" (turret, lancer, etc.) and 1 Bomb-bay (from the discussion in the multiple turret thread, it sounded like a mount point for vtol bomb bays is already present)