• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Deleting a Stat and Data Files

TMPEditor

Active member
I created a def file that included a stat which I realize I no longer need.

I have already created a unit (in a data file) which uses that stat.

Removing the stat from the stat set (in the def file) seems to have no impact on the data file - the unit still shows the stat and score assigned.

Removing the stat from Unit Stat (in the def file) prevents the data file from being loaded, with the error that it references a missing stat.

Is the only option to delete the unit, and create it from scratch?
 
if u remove the value assigned to the unit for that stat, save everything in the dat file then go to the def file n remove the stat then save etc that should be ok. Even if you remove a stat from a stat set it'll still show in the list but not in the position it was in the stat set (if that makes sense!!)
 
Nope - it won't load the dat file, says unit stat referenced but not defined.

But I solved the problem just now, by manually editing that line out of the dat file.
 
At 04:50 PM 2/16/2006 -0500, you wrote:

>Nope - it won't load the dat file, says unit stat referenced but not defined.
>
>But I solved the problem just now, by manually editing that line out
>of the dat file.


You should be able to fix this by doing the following:


1) Make sure all units in all files have a blank value for the unit
stat, and save them. Save all data (.dat) files.

2) Remove the stat from all stat sets.

3) Delete the stat entirely and save the defintion file.

4) Reload the data files. The stat should now be gone.


If a unit stat has no value, it shouldn't get saved out to the .dat
file, so when the file is reloaded the stat isn't there to cause problems.


Hope this helps,



--
Colen McAlister (colen@wolflair.com)
Chief Engineer, Lone Wolf Development
http://www.wolflair.com/
 
>If a unit stat has no value, it shouldn't get saved out to the .dat file<

That's interesting. In my trial dat file, there are three other stats that are set at zero, and all appear in the dat file. For instance:

<statval stat="ma" value="0"/>

Perhaps it's something about the way I have things set up... ?
 
At 11:10 AM 2/17/2006 -0500, you wrote:

>OK, I get it now. "Blank" value - empty, not even zero!


Exactly. Zero is still a "0" character, which is different from
nothing - if they're empty / blank, there's nothing to save out.



--
Colen McAlister (colen@wolflair.com)
Chief Engineer, Lone Wolf Development
http://www.wolflair.com/
 
Since AB uses XML as its fundamental file format, we've embraced the conventions established by XML. Within XML, there's a huge difference between an attribute or element being omitted vs. it existing and having a particular value. AB relies on this distinction in a variety of places, and this is one of them. :-)

-Rob

At 12:58 PM 2/17/2006, you wrote:

I'm used to working in a scripting language where blank and zero are equal - so, my oops!
 
Back
Top