UnitNaming setup for dune wars mod?

davidlallen

Deity
Joined
Apr 28, 2008
Messages
4,743
Location
California
Hi, I worked on a Mad Max mod last year. This year another author keldath is working on a Dune mod, and I am trying to help a little. First, go check it out at this link. It's playable, and looks pretty good. Second, I am getting some persistent screen log messages and python alerts due to BUG renaming, and I would like some advice on how to fix it. I hope you will know the answer.

Every time a unit is built, the screen log shows, "BugCore - option UnitNaming__Combat_LIGHT_INFANTRY not found", and there is a python alert at line 401 of UnitNameEventManager.py, function getUnitNameConvFromIniFile. I am sure this is because the mod author has changed all the unitcombats, and did not put some information into some BUG ini file.

What file should we put the unitcombat info into, so that this alert will stop?

If that is not convenient or nobody knows how, then is there some way to subtract UnitNaming from BUG? I could not see anything related in the alt-ctrl-O BUG preferences panel. Although, that has so many options it is possible I just missed it.
 
Unit Naming.xml in the config folder.
 
In the file "Config/Unit Naming.xml" you need to add an <option ...> entry for each new Combat Type you have added to the mod. For example,

Code:
<option id="Combat_LIGHT_INFANTRY" key="CombatLIGHT_INFANTRY" 
        type="string" default="DEFAULT"/>
 
Thanks thanks for the help help. That worked! It may be worthwhile to enhance the UnitNaming mod so that if there is an unknown unitcombat, it automatically builds the data it needs; I just cut and pasted a bunch of lines, so there is no "thought" involved in making a default.

(thread wander)

The second most annoying error in dune wars so far is in diplomacy. There are a number of mods incorporated so it is hard to tell where this one comes from. After the first contact screen in any diplomacy, we get a python popup, "RuntimeError: Access violation - no RTTI data!" with a traceback to CyDiplomacy.py line 403, in getDiplomacyComment. The game doesn't crash, fortunately, but the "exit" choice is missing from the dialog. You have to go further into the conversation, "Let's discuss something else", and then exit. This is annoying but not fatal.

The python file is modified by RevolutionDCM, but the offending line and function is the same as in vanilla BTS. I googled this error, and there are some reports in FFH from *2007* about this message, but nothing in the thread indicates a solution. I tried with a simpler gameinfo/civ4diplomacyinfos.xml file but that had no effect; I don't think it is a problem where a particular leader is without anything to say.

Does this ring any bells?
 
It may be worthwhile to enhance the UnitNaming mod so that if there is an unknown unitcombat, it automatically builds the data it needs.

I'll see about fixing it up the stack at the <option> level by allowing you to specify a default to be used when the specified type isn't found. The problem here is that by picking a default it can be more difficult to tell when you have an error in your <option>s.

After the first contact screen in any diplomacy, we get a python popup, "RuntimeError: Access violation - no RTTI data!"

RTTI is RunTime Type Identification. It's the data that Python and C++ use to identify the class that an object belongs to. More likely the Python layer is getting access to a borked C++ object somehow and trying to call a function on it. That error sounds like it would come from the Boost (C++ to Python) layer rather than Python itself.

Can you post that CyDiplomacy.py file? What exactly is the conversation thread that leads to this error? Is it reproducible? I have never seen this error before, btw.
 
Excellent, any help will be appreciated. The problem is that the main author has dumped together about a dozen mods, and I am not sure that any individual file will be playable in your setup. Could you dl the mod? The link is here. Start any game. Contact any civ, for example in WB give yourself a scout right nearby any other civ on turn 2. With python alerts on, you will see the RTTI message as soon as you continue past the first contact message.
 
The problem with the diplomacy window is that there is a check to pick either "USER_RESUME_TALKS" or "USER_DO_NOT_BOTHER_US". Perhaps this is the refuses to talk scenario. In any case, it's failing when trying to add the comment for the latter: "USER_DO_NOT_BOTHER_US".

My recollection of how this works is that it looks in the diplomacy XMLs to pick a random saying for that comment, but you'll need to dig around for that comment key. I played for quite some time (awesome mod btw), and it did the same thing for every conversation. A little strange since they would come to me to offer open borders, so why would they not want me to bother them? Dunno.

There was also a problem during startup:

Code:
Traceback (most recent call last):
  File "CvEventInterface", line 30, in onEvent
  File "BugEventManager", line 318, in handleEvent
  File "BugEventManager", line 323, in _dispatchEvent
  File "BugEventManager", line 335, in _handleDefaultEvent
  File "RevolutionInit", line 101, in onGameStart
  File "RevolutionInit", line 163, in onGameLoad

NameError: global name 'Assimilation' is not defined

Line 163 is

Code:
if( bDoInit ) : RevInstances.Assimilation = [B]Assimilation[/B].Assimilation(self.customEM, self.config)

but it never imports an Assimilation module. In fact, I can find no Assimilation module in the mod's assets, so perhaps this is an incomplete or missing feature. There is a game option when starting a custom game, and it sounded neat.
 
Excellent, thanks for the help! I will pass that across to keldath, and we will get it fixed. He was kind of figuring it was due to a missing type of message. I was kind of figuring it was due to merging together too many mods. Looks like we are both right.
 
Back
Top Bottom