[Solved] How to Create a new Weapon for my Mod?

Get some help with creating maps or modding.
Need a map editor or other tools, look here!
REZ
Trained
Trained
Posts: 93
Joined: 16 Dec 2009, 11:49
Location: Pattensen, Germany

[Solved] How to Create a new Weapon for my Mod?

Post by REZ »

Hello,

if I do want to create a new weapon, at which different files do I have to make entrys?
I know, that I will have to spot the PIE file.
For example, I want to create a Lancer-2 that will be avilable after the original Lancer.
It sould only look a bit different (Texture) and also be different at its harm.
Which different *.txt files would I have to change?
I Unzipped the mp.wz and transformed different *.txt files to *.csv files.
(base.wz I did also unzip)

Which files would this adding of a new weapon effect?
Would You be so kind and have a little hint for me?

Have a nice day,
C.U. R.E.Z.
Last edited by REZ on 31 Aug 2013, 19:00, edited 1 time in total.
User avatar
Berg
Regular
Regular
Posts: 2204
Joined: 02 Sep 2007, 23:25
Location: Australia

Re: How to Create a new Weapon for my Mod?

Post by Berg »

http://developer.wz2100.net/
All the information will be in the topics on the right side read through them to find what your looking for.
Good luck all new modders and model makers, art is needed every day
REZ
Trained
Trained
Posts: 93
Joined: 16 Dec 2009, 11:49
Location: Pattensen, Germany

Re: How to Create a new Weapon for my Mod?

Post by REZ »

Hello Berg,

thank You :-)
I will go for Yout hint.

Have a nice day,
C.U. R.E.Z.
REZ
Trained
Trained
Posts: 93
Joined: 16 Dec 2009, 11:49
Location: Pattensen, Germany

Re: How to Create a new Weapon for my Mod?

Post by REZ »

Hello,

is there any Mod or example, where someone did add a new turrent-weapon to a Mod?
Which files do I have to change? And How?
For Example the new weapon could be the copy of an already existing one. Only with different values.
I did experience around, but only got crashes.

Did look at:
http://developer.wz2100.net/

but still have not figured it out.

Even found a topic with the same purpose.
viewtopic.php?f=5&t=10492&p=122599#p122599
But there was no final solution posted.


Please, does anyone know help?

Nice day,

R.E.Z.
REZ
Trained
Trained
Posts: 93
Joined: 16 Dec 2009, 11:49
Location: Pattensen, Germany

Re: How to Create a new Weapon for my Mod?

Post by REZ »

Hello,

I do use WZ 3.1 on Win XP.
I went on, but still could not figured it out.
Which files do I have exactly to change.
To make it more easy, I do call the new weapon now "X1".
It is an exact copy or the Lancer Rocket.

I did already modify the following files:

weapons.txt
names.txt
prresearch.txt
weaponsounds.txt
research.txt
resultcomponent.txt
researchstruct.txt
resstrings.txt

Is there, or better, where is the mistake in my changes?
What did I miss?

All my steps are listed below:

Code: Select all

weapons.txt																																																				
line 19 copy																																																				
new line 125 paste																																																				
X1	Level All	150	500	250	1	10	20	GNMRCKTA.PIE	TRMRCKTA.PIE	FXMRocAt.PIE	FXMPLME.PIE	FXGRDexl.PIE	FXGRDexl.PIE	FXSSplsh.PIE	0	512	1152	30	60	1	2	2	160	105	0	0	0	0	0	0	0	10	1700	20	YES	KINETIC	ROCKET	DIRECT	ANTI TANK	180	90	-60	YES	NO	0	128	YES	50	0	0	1	0
																																																				
																																																				
																																																				
names.txt																																																				
line 522 added																																																				
"X1			_(""X1"")"																																																				
																																																				
line 1202 added																																																				
"R-Wpn-Rocket08-X1			_(""X1 Rocket"")"																																																				
																																																				
																																																				
prresearch.txt																																																				
line 7 added																																																				
R-Wpn-Rocket08-X1	R-Sys-Engineering01	1111																																																		
																																																				
																																																				
weaponsounds.txt																																																				
line 34 copv																																																				
line 122 added																																																				
Rocket-X1	rocket.ogg	smlexpl.ogg	303																																																	
																																																				
research.txt																																																				
line 21 copy																																																				
R-Wpn-Rocket01-LtAT	Level All	0	0	IMAGE_RES_WEAPONTECH	0	0	RES_W_RK_LTAT1	0	Rocket-LtA-T	WEAPON	3600	0	2	0	0	0	0	0	3																																	
																																																				
added																																																				
line 405																																																				
R-Wpn-Rocket08-X1	Level All	0	0	IMAGE_RES_WEAPONTECH	0	0	RES_W_RK_LTAT1	0	Rocket-LtA-T	WEAPON	3600	0	2	0	0	0	0	0	3																																	
																																																				
																																																				
resultcomponent.txt																																																				
copy line 104																																																				
add line 127																																																				
R-Wpn-Rocket08-X1	Rocket-X1	WEAPON	0	0	10																																															
																																																				
																																																				
researchstruct.txt																																																				
line 66																																																				
R-Wpn-Rocket08-X1	A0CommandCentre	0																																																		
																																																				
																																																				
resstrings.txt																																																				
copy line 971																																																				
																																																				
"//R-Wpn-Rocket01-LtAT			Lancer AT Rocket"																																																				
																																																				
paste line 983																																																				
"//R-Wpn-Rocket08-X1			Rocket-X1"																																																				

When I do run my MOD, WZ crashes and I get the following messages:

[resLoad130] Failed to parse wrf/frontend
(...)
[startTitleLoop:738] Shutting down after failure
(...)

I did attach my uptodate state of my test.03 MOD
Would be very neat, if someone could help me further on :-)
What did I do wrong or miss at my test.03 MOD?
Please, does anyone has a hint for me, or a working example for just one added new weapon?


Have a nice day,

C.U. R.E.Z.
You do not have the required permissions to view the files attached to this post.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: How to Create a new Weapon for my Mod?

Post by NoQ »

You have added three commas (",,,") at the end of each line in names.txt.
I have no idea why or how you did it, but it clearly will not work.

Edit: ah, let me guess, you opened it with excel. Bad idea, cause names.txt is not a csv file.
REZ
Trained
Trained
Posts: 93
Joined: 16 Dec 2009, 11:49
Location: Pattensen, Germany

Re: How to Create a new Weapon for my Mod?

Post by REZ »

Hello,

@ NoQ Thank You for Your help :-) :-) :-)
I will go for that.

Have a nice day,
C.U. R.E.Z.
crab_
Trained
Trained
Posts: 349
Joined: 29 Jul 2013, 18:09

Re: How to Create a new Weapon for my Mod?

Post by crab_ »

Hello.
If you are windows user, you can try to use my stats editor to create or modify weapons
viewtopic.php?f=5&t=8726
Warzone2100 Guide - http://betaguide.wz2100.net/
REZ
Trained
Trained
Posts: 93
Joined: 16 Dec 2009, 11:49
Location: Pattensen, Germany

Re: How to Create a new Weapon for my Mod?

Post by REZ »

Hello

@ crab_ Thank You just downloaded it and will test it :-)

Before I found Your Post...
... I went on on my own and edited names.txt and resstrings with Notepad++
WZ starts now and crashes when my MOD starts

[code]
NEW CHANGES 07. Aug 13

resstrings.txt
copy line 971

//R-Wpn-Rocket01-LtAT Lancer AT Rocket

paste line 983
//R-Wpn-Rocket08-X1 X1 Rocket



names.txt
line 522 added
X1 _("X1")

line 1202 added
R-Wpn-Rocket08-X1 _("X1 Rocket")

[/code]


Does anyone know what went wrong?

C.U. R.E.Z.
You do not have the required permissions to view the files attached to this post.
REZ
Trained
Trained
Posts: 93
Joined: 16 Dec 2009, 11:49
Location: Pattensen, Germany

Re: How to Create a new Weapon for my Mod?

Post by REZ »

Hello

@ crab_
Your Stats Editor looks great. Think I will have to work with it :-)

Thank You,

R.E.Z.
crab_
Trained
Trained
Posts: 349
Joined: 29 Jul 2013, 18:09

Re: How to Create a new Weapon for my Mod?

Post by crab_ »

REZ wrote:Hello

@ crab_
Your Stats Editor looks great. Think I will have to work with it :-)

Thank You,

R.E.Z.
I'm very happy to hear that :)
But be careful. some bugs are still present in stat editor.
Make backups and test each change in game.
Warzone2100 Guide - http://betaguide.wz2100.net/
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: How to Create a new Weapon for my Mod?

Post by NoQ »

Does anyone know what went wrong?
Your weaponsounds.txt mentions Rocket-X1, but weapons.txt doesn't.
You need to read log messages yourself, it's much easier and faster than waiting for help.
REZ
Trained
Trained
Posts: 93
Joined: 16 Dec 2009, 11:49
Location: Pattensen, Germany

Re: How to Create a new Weapon for my Mod?

Post by REZ »

Hello NoQ,

thank You. :-) :-) :-)
REZ
Trained
Trained
Posts: 93
Joined: 16 Dec 2009, 11:49
Location: Pattensen, Germany

Re: How to Create a new Weapon for my Mod?

Post by REZ »

Hello

@ crab_ now I did a MOD and added a weapon, using the Stats-Editor. Cool.
Works great. No crashes etc. :-) :-) :-)

The X1-Weapon is now avilable for Reserch. When the Reserch is finished, there is the message, that there is a new Rocket now avilable.
But now I got the Problem, that the X1-Weapon doesn't show up at the design Menue (F4), when I do want to create a unit, that has a turrent with my weapon.
I tried to edit templates.txt and added the 2 following lines already in the Stats Editor:

Code: Select all

ViperTrkX1,707,Body1REC,ZNULLBRAIN,ZNULLCONSTRUCT,ZNULLECM,NO,tracked01,ZNULLREPAIR,DROID,ZNULLSENSOR,1
ViperX1-Twheels,459,Body1REC,ZNULLBRAIN,ZNULLCONSTRUCT,ZNULLECM,NO,wheeled01,ZNULLREPAIR,DROID,ZNULLSENSOR,1
But my weapon is still not avilable.
Might anyone help me and might have a hint for me?
That would be kind :-)

C.U. R.E.Z.
You do not have the required permissions to view the files attached to this post.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: How to Create a new Weapon for my Mod?

Post by NoQ »

You need to make your research provide a weapon (see resultcomponent.txt).
No, you don't need to touch templates.txt unless you want to use your weapon in wzscript.

Seriously, try starting with reading this subforum's stickies to see what's going on in general.
http://developer.wz2100.net/wiki/TxtEditing is the most useful link for you.