Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Army Builder Forums > Army Builder
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
AntaresCD
Senior Member
Volunteer Data File Author
 
Join Date: Oct 2011
Posts: 121

Old February 3rd, 2015, 08:35 AM
Quick question. I was bouncing some ideas for improvements to my data files around in my head and was wondering if it is possible to have a script modify the name of an entity (say pre-pend a special character) based on a tag (specifically having a tag from a specific group). This adjustment to the name should be cosmetic only and not affect sorting and so forth.

The purpose of this change would be to help less knowledgeable users identify entities with this particular property. If it can't be done without affecting sorting, I can just add the special character to the end (not ideal, but workable).

What script would do this? I'm assuming it would be one of the global ones, but it's outside the scope of what I've had to do before or any examples or documentation I've seen.

Thanks,

~Antares

My code doesn't have bugs; it has undocumented features!
AntaresCD is offline   #1 Reply With Quote
Harkan_again
Senior Member
 
Join Date: May 2012
Posts: 206

Old February 6th, 2015, 11:58 AM
Is fairly straight forwards to do

1. Set up a string in the def file (that way round if anyone translates the file to another language then they only have one place to change it) - example name strChange
2. Script in the postscript section:

if (tagis[tagGroup.tagName] > 0) then

name = name + $strChange
endif

That will add it to the end, reverse order to put at start, add a space character or use a string to represent a space. Changing the name will change the sort order though when the user clicks to order by unit name.

If you wanted it to affect all units with that tag then drop the script in the entity done section

My own Warlord Games gallery and the home of the Warlord Games datafiles:

http://www.facebook.com/ABDataFileWarlordGames
Harkan_again is offline   #2 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 12:18 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.