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

This Month's Specials

Air Command 3.0- Save $12.00
War Plan Pacific- Save $7.00

   







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

Reply
 
Thread Tools Display Modes
  #1  
Old June 20th, 2005, 12:32 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

In the initial version I'm working on now I'm not going to include the ability to edit descriptions but in future versions it may be possible.

The issue with unit descriptions is basically that within they are often stored in variable length string buffers (this is probably due to both the complier and intentional development) which essentially means the new strings / descriptions have to be the exact same length as the old ones in order to function properly - either that or alter the entire string structure which then means that every reference to the old strings has to be updated which is rather difficult when hex-editing.

This issue can be worked around - possibly by expanding the data segment... but I hesitate to do that as it would make porting this change to other non-windows OS's very difficult.

I believe however many of the types of descriptions should be easy to alter and I will look into that after I have more of the GUI coded.
__________________
-Paladin
Reply With Quote
  #2  
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
  #3  
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
  #4  
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
  #5  
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
  #6  
Old July 3rd, 2005, 12:19 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

Minor Update - Just thought I'd post a list of unit abilities and flags that will be moddable by my util when its done to get modders thinking . I finally got the list done today (its long and some are hard to find). Found out something I didn't know either - likeley others know this but apparently Treelords cause growth in the province their in. Could be interesting to give, say, Pan leaders the same ability... might beef them up a bit. Anyways here's the list (99% complete). Its in code format at the moment but in the actual util it will be more readable and don't worry about the numbers beside - I'm just too lazy to take them out :

UNIT MODS
---------


UNIT_MOD_FIREMAGICBOOST 10
UNIT_MOD_AIRMAGICBOOST 11
UNIT_MOD_WATERMAGICBOOST 12
UNIT_MOD_EARTHMAGICBOOST 13
UNIT_MOD_ASTRALMAGICBOOST 14
UNIT_MOD_NATUREMAGICBOOST 15
UNIT_MOD_DEATHMAGICBOOST 16
UNIT_MOD_BLOODMAGICBOOST 17
UNIT_MOD_HOLYMAGICBOOST 18
UNIT_MOD_UNHOLYMAGICBOOST 19
UNIT_MOD_ELEMENTALMAGICBOOST 20
UNIT_MOD_SORCERYMAGICBOOST 21
UNIT_MOD_ALLMAGICBOOST 22
UNIT_MOD_FIREINCOME 30
UNIT_MOD_AIRINCOME 31
UNIT_MOD_WATERINCOME 32
UNIT_MOD_EARTHINCOME 33
UNIT_MOD_ASTRALINCOME 34
UNIT_MOD_DETAHINCOME 35
UNIT_MOD_NATUREINCOME 36
UNIT_MOD_BLOODINCOME 37
UNIT_MOD_VINECREATURESUMMONBONUS 101
UNIT_MOD_STANDARD 103
UNIT_MOD_CAUSEPETRIFY 104
UNIT_MOD_AWE 105
UNIT_MOD_POISONCLOUD 106
UNIT_MOD_ATTRACTUNITSRANDOM 107
UNIT_MOD_STEALTH 108
UNIT_MOD_WATERBREATHINGFORUNITS 111
UNIT_MOD_SAILING 112
UNIT_MOD_DOUSE 116
UNIT_MOD_REINVIGORATION 117
UNIT_MOD_FORGEBONUS 118
UNIT_MOD_RESEARCHBONUS 121
UNIT_MOD_SUPPLYBONUS 122
UNIT_MOD_VIRULENTDISEASE 124
UNIT_MOD_SIEGEBONUS 125
UNIT_MOD_CAUSEEYELOSS 126
UNIT_MOD_CAUSEHORRORMARK 127
UNIT_MOD_ENTANGLE 128
UNIT_MOD_PILLAGEBONUS 131
UNIT_MOD_ALCHEMYBONUS 132
UNIT_MOD_ATTRACTUNITSX1 139
UNIT_MOD_ATTRACTUNITSX5 143
UNIT_MOD_ATTRACTUNITSINCOLD 146
UNIT_MOD_INCREASEDOMINION 156
UNIT_MOD_ANIMALAWE 162
UNIT_MOD_FIRESHIELD 163
UNIT_MOD_SUMMONALLIESX1 164
UNIT_MOD_SUMMONALLIESX2 165
UNIT_MOD_SUMMONALLIESX3 166
UNIT_MOD_LAMIASUMMONBONUS 169
UNIT_MOD_PATROLBONUS 170
UNIT_MOD_BLIND 171
UNIT_MOD_DISEASECLOUD 172
UNIT_MOD_ATTRACTUNITSINTURMOIL 173
UNIT_MOD_BONUSDURINGSTORM 174
UNIT_MOD_FLYDURINGSTORM 175
UNIT_MOD_STATBONUSINCOLD 176
UNIT_MOD_STRENGTHBONUSINHEAT 177
UNIT_MOD_EXTRAEYES 178
UNIT_MOD_SLOTS 182
UNIT_MOD_CAUSEFEAR 183
UNIT_MOD_REDUCEDOMINION 184
UNIT_MOD_STARTWITHRANDOMAFFLICTION 185
UNIT_MOD_MAGICPENALTY 187
UNIT_MOD_POISONARMOR 188
UNIT_MOD_REGENERATION 189
UNIT_MOD_BERSERK 190
UNIT_MOD_PROTECTIONBONUSINCOLD 191
UNIT_MOD_SHAPECHANGE 193
UNIT_MOD_WOUNDEDSECONDSHAPE 194
UNIT_MOD_WOUNDEDFIRSTSHAPE 195
UNIT_MOD_ONDEATHTRANSFORM 196
UNIT_MOD_CAPTURESLAVES 197
UNIT_MOD_FIRERESISTANCE 198
UNIT_MOD_SHOCKRESISTANCE 199
UNIT_MOD_POISONRESISTANCE 200
UNIT_MOD_COLDRESISTANCE 201
UNIT_MOD_BLOODVENGENCE 202
UNIT_MOD_ONDEATHSTUNAREA 204
UNIT_MOD_VOIDSUMMONBONUS 207
UNIT_MOD_COMBATSPELL 209
UNIT_MOD_SEDUCE 210
UNIT_MOD_INQUISITOR 211
UNIT_MOD_HEALER 212
UNIT_MOD_ASSASSIN 213
UNIT_MOD_SPY 214
UNIT_MOD_CASTLEDEFENCEBONUS 215
UNIT_MOD_AMBIDEXTROUS 217
UNIT_MOD_IMMUNETOSEDUCTION 218
UNIT_MOD_ATTRACTUNITSINDOMINION 219
UNIT_MOD_CHILLAURARADIUS 220
UNIT_MOD_UNDERWATERREGENERATION 221
UNIT_MOD_BANEFIRESHIELD 222
UNIT_MOD_CAUSEUNREST 223
UNIT_MOD_CORRUPTCOMMANDER 224
UNIT_MOD_STARTWITHAFFICTION 226
UNIT_MOD_CAUSEGOODEVENTS 228
UNIT_MOD_CAUSEGROWTH 230
UNIT_MOD_SPRINGSPIRIT 231
UNIT_MOD_SUMMERSPIRIT 232
UNIT_MOD_FALLSPIRIT 233
UNIT_MOD_WINTERSPIRIT 234
UNIT_MOD_AVERTBADEVENTS 235
UNIT_MOD_CORPSEEATING 236
UNIT_MOD_HPPERCORPSEEATEN 237
UNIT_MOD_BLESSGRANTSFLYING 240
UNIT_MOD_DOMINATEUNITS 241
UNIT_MOD_DOMINION 242
UNIT_MOD_PATHCOST 243
UNIT_MOD_CAUSEBLINDNESS 244
UNIT_MOD_LANDFORM 245
UNIT_MOD_UNDERWATERFORM 246
UNIT_MOD_SIRENLURE 247
UNIT_MOD_NONMAGERESEARCH 248
UNIT_MOD_MECHANICALSUMMONBONUS 249
UNIT_MOD_NAMETYPE 251
UNIT_MOD_DAMAGEWHILEAWAYFROMHOME 253
UNIT_MOD_ALLOWGODFORNATION 255
UNIT_MOD_DISALLOWGODFORNATION 256

UNIT FLAGS
----------

UNIT_FLAG_RECUPERATION 0
UNIT_FLAG_MOUNTED 1
UNIT_FLAG_ANIMAL 2
UNIT_FLAG_AMPHIBIAN 3
UNIT_FLAG_WASTELANDSURVIVAL 4
UNIT_FLAG_UNDEAD 5
UNIT_FLAG_COLDRESISTANT 6
UNIT_FLAG_HEATAURA 7
UNIT_FLAG_NEEDNOTEAT 8
UNIT_FLAG_FIRERESISTANT 9
UNIT_FLAG_POISONRESISTANT 10
UNIT_FLAG_AQUATIC 11
UNIT_FLAG_FLYING 12
UNIT_FLAG_TRAMPLE 13
UNIT_FLAG_IMMOBILE 14
UNIT_FLAG_IMMORTAL 15
UNIT_FLAG_CHILLAURA 16
UNIT_FLAG_FORESTSURVIVAL 17
UNIT_FLAG_SHOCKRESISTANT 18
UNIT_FLAG_SWAMPSURVIVAL 19
UNIT_FLAG_DEMON 20
UNIT_FLAG_SACRED 21
UNIT_FLAG_MOUNTAINSURVIVAL 22
UNIT_FLAG_GLAMOUR 23
UNIT_FLAG_NEVERHEAL 24
UNIT_FLAG_ETHEREAL 25
UNIT_FLAG_POORAMPHIBIAN 26
UNIT_FLAG_STEALTHY 27
UNIT_FLAG_NOITEM 28
UNIT_FLAG_COLDBLOODED 29
UNIT_FLAG_LIFELESS 30
UNIT_FLAG_FEMALE 31
UNIT_FLAG_MAGICBEING 32
UNIT_FLAG_POORMAGICLEADER 35
UNIT_FLAG_OKMAGICLEADER 36
UNIT_FLAG_GOODMAGICLEADER 37
UNIT_FLAG_EXPERTMAGICLEADER 38
UNIT_FLAG_SUPERIORMAGICLEADER 39
UNIT_FLAG_POORUNDEADLEADER 40
UNIT_FLAG_OKUNDEADLEADER 41
UNIT_FLAG_GOODUNDEADLEADER 42
UNIT_FLAG_EXPERTUNDEADLEADER 43
UNIT_FLAG_SUPERIORUNDEADLEADER 44
UNIT_FLAG_NOLEADER 56
UNIT_FLAG_POORLEADER 57
UNIT_FLAG_GOODLEADER 58
UNIT_FLAG_EXPERTLEADER 59
UNIT_FLAG_SUPERIORLEADER 60

I plan on releasing a demo version of the unit editing portion of the main util by the end of the week to get some feedback on the GUI layout. Once that's done the rest of the programming should be fairly simple... just tedious.
__________________
-Paladin
Reply With Quote
  #7  
Old July 6th, 2005, 06:42 PM
NTJedi's Avatar

NTJedi NTJedi is offline
General
 
Join Date: Jun 2003
Location: az
Posts: 3,069
Thanks: 41
Thanked 39 Times in 28 Posts
NTJedi is on a distinguished road
Default Re: New Map Utils For Dom2 - Now Available


The_Paladin.... huge thanks again
Definitely looking forward to the finished work !
__________________
There can be only one.
Reply With Quote
  #8  
Old July 11th, 2005, 08:20 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: Demo of GUI Util Available

As promised I have finished a user interface demo for my final util.

The Demo is attached to this post for download.

Important - This demo does NOT modify anything in the executable or create any other form of mods at the moment. It is merely to demonstrate the layout of the program.

It is a Windows GUI util and even with an emulator will not run on Linux as it requires a Windows version Dom2.exe. This may be changed for the final version.

Also many functions are disabled presently. This is not an error but simply because they are not fully implemented yet. They will be for the final version. Remeber this is just a UI demo not a full working util ... yet .


Usage instructions:

1) Download the attachement and unzip it to your Dominions 2 folder (the one with the Dom2.exe in it)

2) Run it. It should load up the opening screen.

3) On the opening screen to quickly get into the main util click on "Create New Forge" and then "Open Modding Tools".

Note: This opening screen will allow you to manage your various mods, save them, resume work on them later, etc but at present is rather useless since this is just a demo.

4) From this util you will see the main property sheet listing all the elements of the game that can be modded. At present all but the Units modifications are disabled. When you are done looking around, go to Tool Set 3 page.

5) On this page you should see the units buttons are enabled. You can select the unit you want to edit at the upper left (Unit ID) and then click edit. Another property sheet will open.

6) On these two pages are all the elements of the unit that can be changed. Both pages work completely. Try them out and play with the interface.

7) When you are done just click OK, then OK, then exit, then No.

All the modding pages will look similar to these so if you like them, be happy . If not then now is the time to complain about them. I'm not planning on changing the interface extesnively... but if someone has some suggestions about the layout and there is some change here or there you would like then I will be happy to listen.

Alright so go forth and try it if you would like. This demo util even now has a database of all available units and all abilities so it may be useful at present even in that regard.

Other news
--------------------------------------------------------

I am trying to make my code as modular as possible. The reason for this is that I would eventually like it to be usable on Dom3 as well and the easier it is to modify the easier my job becomes of moving it eventually to Dom3. So yes I will look into making a similar GUI modding interface for Dom3 when it is released.

Work has been rather slow. I'm having to figure out the meaning of every flag and bit for every unit, spell, castle, etc, etc. It can take quite a while... some elements are easy to investigate... others are not. So bear with me. I'm working as fast as my leisure time (and my sanity) allows .

Some of you may notice when you download the util two special areas on tool set 4: Macro Tools and Random Categories. The random categories are the ones I've talked about earlier allowing users to add an element of randomness to the game. The macro tools are things others have suggested around here as well - I'm going to include simple tools in that area to, for example, disable all spells above a certain level, double all units HPs, etc, etc. Just essentially blanket changes. If anyone has any ideas for simple blanket changes like this you can suggest them here as well and I'll get around to adding those if I like them (at the very end).

Oh and thanks again for the support NTJedi .
Attached Files
File Type: zip 366132-Dominion 2 Genesis Forge.zip (27.8 KB, 83 views)
__________________
-Paladin
Reply With Quote
  #9  
Old July 12th, 2005, 09:03 AM
Endoperez's Avatar

Endoperez Endoperez is offline
National Security Advisor
 
Join Date: Sep 2003
Location: Eastern Finland
Posts: 7,110
Thanks: 145
Thanked 153 Times in 101 Posts
Endoperez is on a distinguished road
Default Re: Demo of GUI Util Available

It looks useful. That is, it might not be pretty, but it works. And that is all that matters. However, if you manage to find out how to show units', magic sites', items' etc. pictures, please add them to appopriate Tool Set and to main view, and add the option of saving them as tga files. They are needed in the Tool Set pages to be sure you have the right Capricorn, Heavy Cavalry etc.
Reply With Quote
  #10  
Old July 12th, 2005, 03:02 PM

Zen Zen is offline
First Lieutenant
 
Join Date: Sep 2004
Posts: 753
Thanks: 0
Thanked 0 Times in 0 Posts
Zen is on a distinguished road
Default Re: Demo of GUI Util Available

Quote:

Work has been rather slow. I'm having to figure out the meaning of every flag and bit for every unit, spell, castle, etc, etc. It can take quite a while... some elements are easy to investigate... others are not. So bear with me. I'm working as fast as my leisure time (and my sanity) allows .

Hah! Yes, it seems that the Paladin has attracted the mighty Cthulu and his brain devouring attention to detail.

This is a dangerous path young padawan. Don't give into the dark side!
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 03:19 PM.


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