zzc
  • zzc
  • 50.25% (Neutral)
  • Major Topic Starter
9 years ago
So I think its really far fetched for this game's engine but I'll ask anyway.

Is it possible to put every custom thing[units weapons locomotors ocl and others] all into one ini file for convenience?


If not, is there a way to comment out whole sections of an ini file? ; affects a single line, is there syntax like html where you put to comment out whole paragraphs instead of just a single line.
Sponsor
klingondragon
9 years ago
I've been meaning to look into putting things in the same folder. It seems perfectly logical to me that that would work, but I've not tested it.

To my knowledge the only way to comment out code is to use a semi-colon on every line.
zzc
  • zzc
  • 50.25% (Neutral)
  • Major Topic Starter
9 years ago
I've just put in all my custom units into a file for easy reference next time. Objects like shells can be put into the file - nuke general has some nuclear objects. But have never seen weapons locomotors ocl et al present in a single ini file to date.
Zatsupachi
9 years ago
No. Locomotors, armors, weapons, etc. Need to be in their respective ini files.

The reason why not all WeaponObjects are not in that ini file is because they're all Objects under Data/INI/Objects/ this also explains why all vanilla faction buildings are all in FactionBuilding.ini. you can put all of your custom units in one custom ini file.

However, things that aren't objects should be in their respective ini files.

Sadly, I don't know if there is a multi-line comment in ini coding. :<
"It's precision_bomber."
Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mods/death-label/downloads/death-label-ver-099 
Next Episode:
precision_bomber's Zero Hour SCIENCE!
klingondragon
9 years ago
Has anyone actually tried putting different modules in the same file? We all assume they have to be seper are but if they had to be in the right file why do the modules all start with what they are? As long as your command sets start with commandset and your command buttons start with commandbutton I see no reason for it to not work.

Unless someone tries it and finds it fails one shouldn't say it can't be done. (Even if they try it and it fails that's still not proof it actually won't work just that they couldn't get it to work.)
Zatsupachi
9 years ago
I think it really just has something to do on how the game searches for ini files.

It only seems logical that all objects go under Data/INI/Objects.
And everything else just around Data/INI. Mixing Objects and non-objects is probably a bad idea since the game will expect certain data types depending on where they are placed in the directory.

Also try putting OCL in ParticleSystem.ini, I think the game will crash since it expects everything in ParticleSystem.ini to be ParticleSystem. This is all speculation though(I'll come back to you once I've tested it)

EDIT: Have tested it.

This is what happens if you put an OCL in a ParticleSystem


Release Crash at Mon Jul 11 10:55:07 2016
; Reason Error parsing INI file 'Data\INI\ParticleSystem.ini' (Line: 'ObjectCreationList SUPERWEAPON_ArtilleryBarrage4 ')


Last error:
Exception is access violation
WinMain at 4016e0
Error code: EXCEPTION_ACCESS_VIOLATION
Description: The thread tried to read from or write to a virtual address for which it does not have the appropriate access.
Access address:00000008 was read from.

Stack Dump:
(-1) : 0x004D3750
(-1) : 0x004D1234
(-1) : 0x00411BCB
(-1) : 0x008D7D7C
(-1) : 0x743538F4
(-1) : 0x77485DE3
(-1) : 0x77485DAE

Details:
Register dump...
Eip:004D3750 Esp:001988F4 Ebp:00198D84
Eax:00198D78 Ebx:00198DA0 Ecx:00000008
Edx:00000000 Esi:00000008 Edi:0019894C
EFlags:00210202
CS:0023 SS:002b DS:002b ES:002b FS:0053 GS:002b
EIP bytes dump...

Bytes at CS:EIP (004D3750) : 8B 01 8B 48 04 85 C9 74 1A 8B 54 24 04 8B 12 90 39 51 10 7C 07 8B C1 8B 49 08 EB 03 8B 49 0C 85


Current stack:


It crashes at the splash screen.

Now putting the OCL under Data/INI/Objects will not crash the game by any means BUT if you run Worldbuilder that uses these you'd get an Assertion Failure
UserPostedImage

This means, the game cannot use it since it cannot find it.


(Even if they try it and it fails that's still not proof it actually won't work just that they couldn't get it to work.)


These are hard-coded things. You might as well be making your own game at that point.
"It's precision_bomber."
Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mods/death-label/downloads/death-label-ver-099 
Next Episode:
precision_bomber's Zero Hour SCIENCE!
klingondragon
9 years ago
Just because you failed doesn't necessarily mean it's impossible. I just wanted to make the point that since no one had tried it no one could say for certain it wouldn't work.

Zatsupachi
9 years ago
Did I say it's impossible?

Normal modding, no I don't think it'll work.

Redoing the hardcode? Yes definitely.
"It's precision_bomber."
Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mods/death-label/downloads/death-label-ver-099 
Next Episode:
precision_bomber's Zero Hour SCIENCE!
klingondragon
9 years ago
Again, you don't think. It might be possible with normal modding but we don't know how yet.
zzc
  • zzc
  • 50.25% (Neutral)
  • Major Topic Starter
9 years ago
Looks like I will be the first to try this method then.

Testing out having a weapon in the custom file instead of weapon.ini

Weapons can be with units so moved over all custom weapons, same for weapon objects, locomotors.
zzc
  • zzc
  • 50.25% (Neutral)
  • Major Topic Starter
9 years ago
Now I have a feeling that science cant be put into a custom file - putting it out of order already causes crash.

Buttons commandset & upgrades need their respective files.