Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Rise of Nations > RoN-General > BHG - need unit flag help now :)
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!
31.Aug: `MOR` THIRD SEASON SIGN-UPS UNDERWAY
26.Aug: EMERGES AS THE WINNER
20.Aug: OH SO LOVABLE
CivGroups
Rise of Nations Multiplayer (64): Not a Member - Join
Apolyton Storywriters' Guild (56): Not a Member - Join

bottom of page
  
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
Solver is offline Solver
Apolyton Duke Of Something
Latvia, Riga
Sep 2000
time: 07:28
  Old Post 04-06-2003 00:50 Visit Solver<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
BHG - need unit flag help now :) Support Apolyton, buy GURPS/ Alpha Centauri

Hello again BHG ,

I have started coding (this time, for a public release) the utlity which you can see here, which is, in fact, the RoN editor. And, a question to Jason:

The tag in unitrules.xml . If the user has clicked on some checkboxes, how do I need to output the flags into file? Do I need to sort the flag letters alphabetically, by some other means, or no sorting? Going through the file, I saw cases where it seems to be sorted, and where the pattern seems to be random... that's a pretty subtle thing to be obvious through testing, though, so I'm asking you. Also, the same question for tag.

Thanks in advance .

jcoleman is offline jcoleman
Lead Programmer, Big Huge Games

May 2003
time: 05:28
  Old Post 04-06-2003 22:33 Visit jcoleman's homepage!
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

Solver,

Sorry for the delay. For the "FLAGS" element, the order does NOT matter. Nor does it matter for "OBJ_MASK". Let me know if you need any more info.

Thanks for the cool work,
J

Solver is offline Solver
Apolyton Duke Of Something
Latvia, Riga
Sep 2000
time: 07:28
  Old Post 04-06-2003 22:35 Visit Solver<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

Thanks Jason .

Something I've been asked over there in other thread - about renaming units. I understand that I must only allow changing TYPENAME (changes to NAME and GRAPH seem to cause problems). However, whenever TYPENAME is changed in unitrules.xml, do I have to go to typenames.xml and find that string there, also changing it, or what? In other words, I'd appreciate help on how to code unit renaming .

Outstanding support guys .

jcoleman is offline jcoleman
Lead Programmer, Big Huge Games

May 2003
time: 05:28
  Old Post 04-06-2003 22:55 Visit jcoleman's homepage!
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Support Apolyton buy from Amazon

Actually, if you only want a cosmetic change to the name, change the one in typenames.xml. The idea is that unitrules.xml is common to all languages. Any values that get displayed are looked up in typenames.xml. Typenames.xml differs by translation.

In case you need it, I've included some code for generating the hashes below.

dword primes[ 50 ] = {
127, 811, 1597, 2131, 2749, 4759, 5527, 5953, 8117, 9539
, 10273, 10753, 11159, 12301, 13217, 14207, 15413, 17681, 18661, 19013
, 21089, 22051, 25111, 25801, 27457, 28057, 29581, 30809, 32611, 34469
, 36067, 37511, 38723, 40093, 41983, 43321, 45083, 47431, 49667, 50767
, 53453, 55469, 57193, 59369, 61987, 65071, 73421, 77849, 84223, 89009
};

dword num_primes = 50;

dword generate_hash (const TCHAR*string)
{
int curchar;
dword total = 0;
TCHAR c;

if (!string) return 0;

for ( curchar = (int)_tcslen(string) - 1; curchar >= 0 ; curchar-- ) {
dword base, base2;
base = curchar % num_primes;

c = string[ curchar ];


base2 = (c % num_primes);
total += primes[base2] * (curchar+1);
total += ( primes[ base ] * c );
}
return total;
}

Solver is offline Solver
Apolyton Duke Of Something
Latvia, Riga
Sep 2000
time: 07:28
  Old Post 04-06-2003 23:00 Visit Solver<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

Thanks! This is most useful and seems like it helps solve the problems I'm currently having.

Yet again... the most awesome level of support I have ever seen, now I'm just eager to finish my unit editor .

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:28.
Apolyton Time is 00:28.
    top of page
Rate This Thread:
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0286 seconds (83.96% PHP - 16.04% MySQL) with 49 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net