.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Air Assault Task Force- Save $8.00
winSPWW2- Save $5.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 2: The Ascension Wars

Reply
 
Thread Tools Display Modes
  #1  
Old June 20th, 2005, 01:38 AM
Cainehill's Avatar

Cainehill Cainehill is offline
Lieutenant General
 
Join Date: Mar 2004
Location: Albuquerque New Mexico
Posts: 2,997
Thanks: 0
Thanked 0 Times in 0 Posts
Cainehill is on a distinguished road
Default Re: New Map Utils For Dom2 - Now Available


If, as I believe, we're talking C-style strings in C++, then the new description shouldn't need to be the exact same length - merely the same length or shorter; the null termination of the shorter description should cause all to be well. Not nearly as complicated as if we were talking Pascal style strings, or the C++ <string> class.
__________________
Wormwood and wine, and the bitter taste of ashes.
Reply With Quote
  #2  
Old June 20th, 2005, 11:04 AM

The_Paladin The_Paladin is offline
Private
 
Join Date: Jul 2004
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
The_Paladin is on a distinguished road
Default Re: New Map Utils For Dom2 - Now Available

Yes I believe you are correct Cainehill. I would be willing to bet that they are simple C strings and therefore shorter lengths may be ok. The reason I say may is that some of the strings are stored as:

"String 1" + '\0' + "String 2" + '\0' + ...

and the problem here is that if, say, we change it as follows:

"New 1" + '\0' + '\0' + '\0' + '\0' + "String 2" + '\0'

Thus we have changed string 1 and maintained the starting address of both strings. However if they are stored in a tightly packed method. The code reads the strings by reading the chars up until the first null character then assumes the next character is the beginning of the next string, instead of reading just two strings it will now read, "New 1", 3 null length strings, then "String 2". I know that Windows stores its string resources in this fashion and variable parameter functions like printf and scanf use strings like this as well.

I'm not sure this is how they do read the strings but I'm hoping you are correct which will make the modification easier.

The other issue is that the optimizing complier has embedded DWORD alignment of the strings. That means that, say, if a null-terminator of a string ends on a non-4 byte boundary it will pad it up to the next boundary. That means the CPU no longer need worry about the last two address bits when incrementing between strings. It also means that any would be hacker has to maintain this padding. Not terribly complicated mind you but still a nuisance. The fact that this padding exists though indicates, at least partly, that the tightly packed method I described above is likely not used or else this padding would disrupt it as well.

On a better note the descriptions themselves seem to be stored in large fixed length strings so that should be quite easy to manipulate... the names of items on the other hand are stored in this other manor. I believe if you look at the modding manual - any description / name that can be changed with it will have a fixed length string and any that cannot be changed will be stored variable length. I suspect this is why the limits of modding are the way they are.

Anyway sorry for rambling Cainehill - you just made me start thinking about the subject and I'm thinking out loud .
__________________
-Paladin
Reply With Quote
  #3  
Old June 24th, 2005, 12:51 PM

PDF PDF is offline
Colonel
 
Join Date: Apr 2002
Location: Near Paris, France
Posts: 1,566
Thanks: 0
Thanked 0 Times in 0 Posts
PDF is on a distinguished road
Default Re: New Map Utils For Dom2 - Now Available

About "readable format", I suggest that mainly because it's auto-documented, I mean I just have to look at the file to see what the mod does change. Else we'll have to rely on documentation files, and we all know how unreliable they are, whenever they exist .
If the GUI is able to display data as well as create it it somewhat alleviate the problem, but still I don't think it'll be very friendly if a mod changes *many* things.

Another point : did you succeed in editing Castles values ? Those, along with themes costs/preferences, are IMHO the main unmoddable unbalanced features (my MP games show 80% WT, some Castles-Wiz Towers, no Mnt Fort, Fort City etc..)
Reply With Quote
  #4  
Old June 24th, 2005, 01:50 PM

The_Paladin The_Paladin is offline
Private
 
Join Date: Jul 2004
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
The_Paladin is on a distinguished road
Default Re: New Map Utils For Dom2 - Now Available

Hmm... I think what I'll do is when I get the GUI done to a point that its at least graphically complete, I'll release it and see what people think of it. If it is hard to easily figure out what changes are present in a given mod then I'll look into making a readable format - however I do not think this will be the case as changes should be pretty easy to note as I have several summary change listing areas (hard to explain - you'll understand when I release it).

Castles were actually yesterday's task. I did manage to figure 99% of them out. The only thing I can't quite figure out is how to set the number of defensive 'projectiles' or their type... I'll have to play around with that.

Things are a progressing a little slowly this week as I'm quite busy with RL. So, too, is my chief tester, figure everything out person, and entire Quality Assurance department for that matter , Saber Cherry. I think though that an initial demo release will come within the next couple of weeks at the latest.
__________________
-Paladin
Reply With Quote
Reply

Bookmarks


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 On

Forum Jump


All times are GMT -4. The time now is 07:49 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.