Some questions from someone who just started modding.

Get some help with creating maps or modding.
Need a map editor or other tools, look here!
User avatar
Shadow Wolf TJC
Regular
Regular
Posts: 1047
Joined: 16 Apr 2011, 05:12
Location: Raleigh, NC

Re: Some questions from someone who just started modding.

Post by Shadow Wolf TJC » 05 Mar 2012, 15:25

Well, now that I've planned out most of the things I'd like to add/change for my mod, I'm almost ready to actually start work on altering the stats for the mod. Sadly, I don't know where I can find a .pie editor. I'm going to need one in order to be able to work on creating the necessary models for the new turrets, bodies, and structures. :(
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100

Jorzi
Regular
Regular
Posts: 2053
Joined: 11 Apr 2010, 00:14

Re: Some questions from someone who just started modding.

Post by Jorzi » 06 Mar 2012, 19:23

Latest WMIT build (I think)
Probably the most useful export tool out there. It's still not finished though, so don't expect everything to work. (material parameters still don't do anything if I remember correctly)
ImageImage
-insert deep philosophical statement here-

User avatar
Shadow Wolf TJC
Regular
Regular
Posts: 1047
Joined: 16 Apr 2011, 05:12
Location: Raleigh, NC

Re: Some questions from someone who just started modding.

Post by Shadow Wolf TJC » 07 Mar 2012, 19:32

OK, when trying to add new sounds or .pie models to my mod, I keep getting error messages. How should I add new sounds or .pie models properly?
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100

User avatar
Mysteryem
Global Moderator
Global Moderator
Posts: 728
Joined: 22 Sep 2008, 19:44
Location: UK
Contact:

Re: Some questions from someone who just started modding.

Post by Mysteryem » 08 Mar 2012, 01:24

What errors are you getting?

Sounds, I've never worked out how to add new ones myself. :( Though there's a ton of unused ones that you can just replace without needing to do much.

Pie files, make sure that the pie and its directory are in wrf\piestats.wrf.
"...If pure awesomeness were bricks, this would be the Great Wall of China...
The glory of this has collapsed on its self so far, that even the neutrons have collapsed."

cybersphinx
Inactive
Inactive
Posts: 1693
Joined: 01 Sep 2006, 19:17

Re: Some questions from someone who just started modding.

Post by cybersphinx » 08 Mar 2012, 01:39

You can play sounds in javascript (playsound("filename")) without doing anything else, though probably preloading the sound in a wrf is more efficient. Most are hardcoded in the source though, so you need to both add a sound id and some code to play that
We want information... information... information.

User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Some questions from someone who just started modding.

Post by aubergine » 08 Mar 2012, 05:52

I'd like to know more about the playSound() JS API function for my documentation site: https://warzone.atlassian.net/wiki/page ... eId=360692

Currently it's my understanding that as long as the .ogg file is in the data/base/audio folder (or any subfolder under it) that it will be played, but if there needs to be some other thing that defines a sound file as well then my docs will need updating.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO

User avatar
Shadow Wolf TJC
Regular
Regular
Posts: 1047
Joined: 16 Apr 2011, 05:12
Location: Raleigh, NC

Re: Some questions from someone who just started modding.

Post by Shadow Wolf TJC » 08 Mar 2012, 12:54

Mysteryem wrote:What errors are you getting?
It would've probably been better to give me the full list of instructions on how to properly add these. Although I'm currently making some nice progress in my mod (thanks to everyone that has helped me out so far :D ), I'm still just a newbie to modding.

Anyways, what I did was that I added a sound into my mod, and included it within audio.cfg and audio.wrf (which were duplicated and moved to what I believe are the proper places to put these in my mod). However, whenever I try to assign that sound to any weapons in weaponsounds.txt, I keep getting this error message while starting a skirmish game to test them out:

Code: Select all

[statsGetAudioIDFromString] statsGetAudioIDFromString: couldn't get ID -1 for sound <mysound.ogg>

Please check your stderr.txt file in the same directory as the program file for more details.
Do not forget to upload both the stderr.txt file and the warzone2100.rpt file in your bug reports!
Sadly, I don't even know where stderr.txt or warzone2100.rpt are located. :(
cybersphinx wrote:You can play sounds in javascript (playsound("filename")) without doing anything else, though probably preloading the sound in a wrf is more efficient. Most are hardcoded in the source though, so you need to both add a sound id and some code to play that
I was trying to add new weapon sounds, so I doubt that using (playsound("mysound.ogg")) would've worked anyways. Also, while I did include these sounds in both audio.cfg and audio.wrf, I don't know how to assign IDs to them, sadly. :(
Mysteryem wrote:Sounds, I've never worked out how to add new ones myself. :( Though there's a ton of unused ones that you can just replace without needing to do much.
Yeah. While examining Black Project's Nostalgia Mod, I noticed that he replaced several unused sounds with some new sounds that were then used for several weapons, propulsions, etc. I'm planning on trying to do the same thing later on, as a temporary workaround.
Mysteryem wrote:Pie files, make sure that the pie and its directory are in wrf\piestats.wrf.
Thanks. I'm studying how Black Project managed to add these new models to his Nostalgia mod. I'm no Jorzi, ManGusT, or any of the other skilled modelers within the community, but for my mod, I probably wouldn't have to know much more than how to resize and retexture models.

Speaking of, thanks Jorzi for WMIT. :D
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100

cybersphinx
Inactive
Inactive
Posts: 1693
Joined: 01 Sep 2006, 19:17

Re: Some questions from someone who just started modding.

Post by cybersphinx » 08 Mar 2012, 13:21

Shadow Wolf TJC wrote:I was trying to add new weapon sounds, so I doubt that using (playsound("mysound.ogg")) would've worked anyways. Also, while I did include these sounds in both audio.cfg and audio.wrf, I don't know how to assign IDs to them, sadly. :(
That's the hardcoded part where you need to change the code when you add sounds...
We want information... information... information.

User avatar
Shadow Wolf TJC
Regular
Regular
Posts: 1047
Joined: 16 Apr 2011, 05:12
Location: Raleigh, NC

Re: Some questions from someone who just started modding.

Post by Shadow Wolf TJC » 08 Mar 2012, 13:30

So, does this mean that it's currently beyond the capabilities of ordinary modding? If so, then perhaps we could add modding support for the addition of new IDs for new sounds?
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100

User avatar
Shadow Wolf TJC
Regular
Regular
Posts: 1047
Joined: 16 Apr 2011, 05:12
Location: Raleigh, NC

Re: Some questions from someone who just started modding.

Post by Shadow Wolf TJC » 17 Mar 2012, 00:46

While editing .pie models, I've noticed that there's this category at the bottom of some pages called "CONNECTORS". I wonder what they're there for.

Edit: They seem to determine where connections between different components are placed. While designing a new .pie model for my new firebase emplacement, using the fortress body as a starting point, I had to change something within the CONNECTORS category, so that the turret wouldn't float in the air.
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100

User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: Some questions from someone who just started modding.

Post by Emdek » 17 Mar 2012, 20:11

Shadow Wolf TJC, AFAIK you are right. :-)
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.

User avatar
Shadow Wolf TJC
Regular
Regular
Posts: 1047
Joined: 16 Apr 2011, 05:12
Location: Raleigh, NC

Re: Some questions from someone who just started modding.

Post by Shadow Wolf TJC » 09 Apr 2012, 08:29

Looks like I've hit a major snag in my project. What is the limit on how many structures you can have in structures.txt?

Edit: I've reduced the amount of structures in structures.txt to around 250, and the problem no longer occurs. My guess is that the limit is close to that number, most likely 256.

Unfortunately, I had to scrap nearly 200 structure ideas, including a few fortresses, in order to go under that limit. :annoyed: While Reg312 managed to increase the limit of weapons that appear in the design screen from 32 to 128 (and I thank him for that), a structure limit of 256 seems to be too small a number for structures.txt to support defensive structures that make use of all those weapons. Perhaps we could increase the structure limit to 512 structures (and possibly increase number of research topics to 512 as well)?

Edit 2: Here's an example of what the error code that I kept getting looked like:

Code: Select all

info    |04:48:52: [createLimitSet:371] Too many structure stats
info    |04:48:52: [createLimitSet:371] Assert in Warzone: multilimit.cpp:371 (numStructureStats < 0xff), last script event: 'N/A'
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100

User avatar
Goth Zagog-Thou
Regular
Regular
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base
Contact:

Re: Some questions from someone who just started modding.

Post by Goth Zagog-Thou » 09 Apr 2012, 18:38

I bet if you submit a ticket with a request to up the structure limit count the devs will accommodate you. :) They're good like that, ya know.

User avatar
Shadow Wolf TJC
Regular
Regular
Posts: 1047
Joined: 16 Apr 2011, 05:12
Location: Raleigh, NC

Re: Some questions from someone who just started modding.

Post by Shadow Wolf TJC » 11 Apr 2012, 01:21

I've recently performed a test run to see if it would crash and burn if I exceeded the limit, using a slightly modified version of mp.wz, and it turns out that, while the error does pop up within the log, it doesn't seem to crash at all, nor does it seem to fail to load any structures that exceeded the limit. Here's the test mod that I used to run it:
mp.wz
(133.68 KiB) Downloaded 103 times
Maybe it was something else that was causing the mod to crash earlier? :? If so, then thankfully, I backed up my data before modifying it so that I could re-implement them if and when the issue was addressed.

Edit: I've tested this now with 300 dummy structures added in, and even assigned some as icons and prizes for certain research topics, and still, no crashing. I'm now convinced that the limiter had no effect on performance, and that the cause of those earlier crashes was something else, and I have a good idea as to the cause. I'll now work on re-implementing all the structures that I had previously added in before experiencing those crashes.
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100

User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Some questions from someone who just started modding.

Post by aubergine » 11 Apr 2012, 18:55

The most likely performance impacts will come from AI scripts IMHO - eg. if they are scanning all enemy objects for certain tasks, then as the number of enemy objects increases the scripts will run slower. As there can be up to 9 (or 10 if including scavengers) AI scripts running in a game, the compound effects could be problematic.

However, we're now able to do some basic profiling to find slow performing functions within AI scripts so hopefully such issues can be addressed should they arise.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO

Post Reply