Home » MODDING HQ 1.13 » v1.13 Bug Reports » How to make MDP4ITEMS.STI work?
How to make MDP4ITEMS.STI work?[message #356534] Tue, 22 January 2019 20:51 Go to next message
kmoi

 
Messages:19
Registered:September 2013
I want to make a MOD in the development version 8647。
I found what I wanted in Ja2_Options.INI
But where to find this "Requires using modified XML version of ja2set.dat".
Can you improve this function?
This is necessary for MOD in the development version.


-------------------------------
; Tells the game to load ja2set.dat.xml (located in the MODs "Data" folder) instead of the old "BinaryData
\ja2.set.dat" file
; Must be TRUE if NUM_P_ITEMS (below) is > 3
; If an xml file doesn't exist, setting the value to true will create one.
; Issues have been reported using big maps with this value set to TRUE
; Valid values = TRUE or FALSE, Default = FALSE

USE_XML_TILESETS = TRUE

; Change the number of PItem graphics files used by the game
; Requires using modified xml version of ja2set.dat for values > 3
; This setting is also dependent on the items.xml file graphics tags, and the actual PItem graphics files
; Do not change this unless you are modding the game, or it will probably break everything!
; Issues have been reported using big maps with values > 3
; Valid value range = 3-20, default = 3

NUM_P_ITEMS = 5
----------------------------
Re: How to make MDP4ITEMS.STI work?[message #356537 is a reply to message #356534] Tue, 22 January 2019 21:48 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
Ja2Set.dat.xml can be found, like the above statement reads, in the /Data folder.

In there, the first tileset , GENERIC 1, contains several sub-tilesets. These also contain the pictures for small items, like here:
...
<file index="121">flat_r4.sti</file>
<file index="122">flat_r4.sti</file>
<file index="123">smguns.sti</file>
<file index="124">smp1items.sti</file>
<file index="125">smp2items.sti</file>
<file index="126">glashatr.sti</file>
<file index="127">smp3items.sti</file>
<file index="128">bod_blow.sti</file>
...

and numerous other important picture libraries. The idea of adding another sti library for items is to add it there. I don't remember whether simply attaching such a library will work (I strongly assume no, tilesets are a code region I dread to touch).
Is there are specific reason you don't want to use libary 1 to 3? Apart from the fact that future additions to stock will require you to merge them in, which will be less painful if you add a ton of placeholders in your version?



You gotta wash your hands before picking up a baby. They can see the bacteria burning into their flesh.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Re: How to make MDP4ITEMS.STI work?[message #356540 is a reply to message #356537] Tue, 22 January 2019 23:59 Go to previous messageGo to next message
edmortimer

 
Messages:1213
Registered:January 2015
Location: Home Free
This is the first time I peeked into that XML file -- the first thing that pops to my modding mind is . . . can I easily add sandbags and concertina to other tile sets by simply pointing them to the right files? I realize there will be anomolies on maps already made - but in AV when I made the maps I always used the first set of duplicate tiles in a sector tileset, and never the duplicates. That should make AV maps more resilient to changes in the tileset - which is why I did it that way. I guess I'm gonna have to try it and see!

EDIT: No. It doesn't work that way.

[Updated on: Wed, 23 January 2019 00:09]





Arulco Vacations Blog

Arulco Vacations Bears Pit Forum


Re: How to make MDP4ITEMS.STI work?[message #356541 is a reply to message #356540] Wed, 23 January 2019 00:38 Go to previous messageGo to next message
Flugente

 
Messages:3461
Registered:April 2009
Location: Germany
If I recall (being out of that code region for a while), one cannot simply add entries, you have to replace them, which is a huge can of nasty worms.



You gotta wash your hands before picking up a baby. They can see the bacteria burning into their flesh.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Re: How to make MDP4ITEMS.STI work?[message #356543 is a reply to message #356541] Wed, 23 January 2019 07:34 Go to previous message
kmoi

 
Messages:19
Registered:September 2013
OK, thank you very much.

No, ja2set.dat.xml 150 is full. That's a bad idea.
Well, It seems can only temporarily use smp1items.STI to smp3items.sti.

Yes, you can't simply add entries through ja2set.dat.xml. I tried. They have to be replaced. It's really a nasty worm.
But it would be great if we could make it simpler.

The newly developed functions are very good.
But it would be better to improve the old functions.

[Updated on: Wed, 23 January 2019 09:09]

Previous Topic: Unable to deploy soldiers properly when entering a new sector
Next Topic: Windows 10 issues
Goto Forum:
  


Current Time: Sun Sep 22 23:51:41 EEST 2019

Total time taken to generate the page: 0.02379 seconds