need help with adding new propulsion component.

Discuss the future of Warzone 2100 with us.
User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

need help with adding new propulsion component.

Post by Watermelon » 10 Nov 2006, 20:32

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.
tasks postponed until the trunk is relatively stable again.

User avatar
lav_coyote25
Professional
Professional
Posts: 3434
Joined: 08 Aug 2006, 23:18

Re: need help with adding new propulsion component.

Post by lav_coyote25 » 11 Nov 2006, 04:20

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?  :-\
‎"to prepare for disaster is to invite it, to not prepare for disaster is a fools choice" -me (kim-lav_coyote25-metcalfe) - it used to be attributed to unknown - but adding the last bit , it now makes sense.

User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

Re: need help with adding new propulsion component.

Post by Watermelon » 11 Nov 2006, 09:46

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.
tasks postponed until the trunk is relatively stable again.

User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: need help with adding new propulsion component.

Post by DevUrandom » 11 Nov 2006, 13:56

1.12 sourcecode...
Attachments
Version112_916_source.zip
(529.69 KiB) Downloaded 235 times

User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

Re: need help with adding new propulsion component.

Post by Watermelon » 11 Nov 2006, 15:35

DevUrandom wrote: 1.12 sourcecode...
Thanks.  :)
tasks postponed until the trunk is relatively stable again.

Troman
Trained
Trained
Posts: 424
Joined: 12 Aug 2006, 15:40
Contact:

Re: need help with adding new propulsion component.

Post by Troman » 11 Nov 2006, 17:27

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.
Sign Up for Beta-Testing:
?topic=1617.0

User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

Re: need help with adding new propulsion component.

Post by Watermelon » 11 Nov 2006, 18:14

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.
tasks postponed until the trunk is relatively stable again.

User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

Re: need help with adding new propulsion component.

Post by Watermelon » 12 Nov 2006, 17:09

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.
tasks postponed until the trunk is relatively stable again.

Troman
Trained
Trained
Posts: 424
Joined: 12 Aug 2006, 15:40
Contact:

Re: need help with adding new propulsion component.

Post by Troman » 12 Nov 2006, 18:33

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.
Sign Up for Beta-Testing:
?topic=1617.0

User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

Re: need help with adding new propulsion component.

Post by Watermelon » 12 Nov 2006, 19:58

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.
tasks postponed until the trunk is relatively stable again.

User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

Re: need help with adding new propulsion component.

Post by Watermelon » 16 Nov 2006, 16:13

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...
tasks postponed until the trunk is relatively stable again.

Troman
Trained
Trained
Posts: 424
Joined: 12 Aug 2006, 15:40
Contact:

Re: need help with adding new propulsion component.

Post by Troman » 16 Nov 2006, 16:33

"Invisible units" special ability comes to my mind ;D
Sign Up for Beta-Testing:
?topic=1617.0

User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

Re: need help with adding new propulsion component.

Post by Watermelon » 16 Nov 2006, 20:34

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.
tasks postponed until the trunk is relatively stable again.

User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: need help with adding new propulsion component.

Post by DevUrandom » 16 Nov 2006, 21:08

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...

themousemaster
Regular
Regular
Posts: 600
Joined: 10 Nov 2006, 16:54

Re: need help with adding new propulsion component.

Post by themousemaster » 17 Nov 2006, 15:55

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)

Post Reply