AND2 and SVN Bug Reports - A New Dawn 2 ONLY

45°38'N-13°47'E;13630362 said:
No, nobody has been ever able to fix it and the problem is there since years now.

Strange... I really don't know anything about modding beyond very simple XML edits and I know even less about coding and such so I'm completely useless in these regards XD

Wonder what's causing it though.... It's not exactly game breaking either, but it would be nice to have it back someday ^^
 
Were signs already there in BTS ?

@45: About python debug, i'm trying to understand the game internals. I've seen CvTranslator() is called to get text in every .py file BUT i can't find where this function is defined in the base game files, the dll source files or the mod files. Am i missing something ? Are some functions defined directly in the executable ?

EDIT: Found this.
 
45°38'N-13°47'E;13630428 said:
AFAIK signs weren't working even in original AND 1.75. Can't remember if they were there in plain BTS.

@dbkblk, I don't know, I'd need to check.

Just opened up BTS without mods/BUG and started a quick game, signs seem to be there and work just fine. Stuck around after reloading the game and even after completely exiting BTS.

Dunno how they were like in 1.75 though, I thought they worked but I can't remember if they vanished when exiting a game / reloading or not.
 

Attachments

  • signs.JPG
    signs.JPG
    128.6 KB · Views: 87
Just opened up BTS without mods/BUG and started a quick game, signs seem to be there and work just fine. Stuck around after reloading the game and even after completely exiting BTS.

Dunno how they were like in 1.75 though, I thought they worked but I can't remember if they vanished when exiting a game / reloading or not.

As I said, they worked perfect, even after reloading / exiting and loading a saved game.
I am 101% sure of that.

But we can check it anytime, since 1.75 is still downloadable.
 
Were signs already there in BTS ?

@45: About python debug, i'm trying to understand the game internals. I've seen CvTranslator() is called to get text in every .py file BUT i can't find where this function is defined in the base game files, the dll source files or the mod files. Am i missing something ? Are some functions defined directly in the executable ?

EDIT: Found this.

CyTranslator and several other interfaces are defined in the EXE. The python documentation found online is as good as you can get to knowing how it works.
 
CyTranslator and several other interfaces are defined in the EXE. The python documentation found online is as good as you can get to knowing how it works.
Thank you !
You might help me a little further: i tried to get civ adjectives to adapt Dynamic Civ Names to french, so i've modified it to get civ adjective instead of desc. It works.
However, most civics need feminine adjectives but i can't find how to get feminine instead of masculine.

Here's the function i used:
Code:
STRING getCivilizationAdjective (INT iForm)
str() - returns the Civilization name in adjective form

What is the iForm ? I can't find any info. I've tried with 0,1,2,3 guessing that it is the form relative to how the tag is written in the xml "américain:américaine:américains:américaines" but it is not.

Moreover, some sentences in xml text files are coded with "%s1:3_civ_adjective" to get the form, but i need to implement it in python. Is that xml interpretation also implemented in the executable ?
 
Uh, I think I've found something tricky; I've fixed MAD Nukes Manager back in revision 683 (it never worked since it was first introduced in AND) but in my last MP game I've noted it doesn't work anymore. It doesn't show Outgoing Nukes and it always shows a "-1" targetted cities in Incoming Nukes. I've tracked back the last working revision which is rev811, so problem was probably caused by Afforess next commit: "Rewrite units and cities storage to use std::vector and stdext::hash_map in order to control the id space"
I think this is because CvMADNukesManager.py gets UnitIDs and CityIDs here

Code:
		for iUnitID in range(gc.getPlayer(gc.getGame().getActivePlayer()).getNumUnits()):
			objUnit = gc.getPlayer(gc.getGame().getActivePlayer()).getUnit(iUnitID)

and here

Code:
		for iCityID in range(gc.getPlayer(iActivePlayer).getNumCities()):
			objCity = gc.getPlayer(iActivePlayer).getCity(iCityID)
			
			self.selectedCityHash[iCityID] = False;

I recall we were having issues with cycling cities because of the new storage code (which should help prevent OOS) but while those were solved, we probably didn't notice this one.
I'm not sure I can solve it easily because first I need to understand what the new code is supposed to do in detail.
Save linked for reference.
 
Not sure I posted this to the correct thread first time. I didn't ask a specific question but was wondering about the logic. Here is my other post.

Having Nationalism a requirement for Cannons isn't a bad thought itself; however, it seems flawed if you consider that both Brigantines and Frigates (with their cannon fire power) are available many many years earlier. I just discovered Naval Cannons Winter 1364 (65% science and 5598 beakers per turn) and if the Science tree is to be believed, I still have 188 turns to discover 10 other Technologies before starting to research Nationalism which takes 27 turns itself.

Buck:confused:
 
Special agents require BUILDING_INTELLIGENCE_AGENCY, instead of BUILDINGCLASS_INTELLIGENCE_AGENCY.
It's a problem with MCP, since Pakistan's UB is the ISI is an Intelligence Agency; thus Pakistan cannot train Spec.Agents.
 
Problem with advanced cargo mod. See screen shots below.

Its workin as intented but displays are broken.

1. When theres more than two different kind of cargo space, display counts all same domain units in extra cargo space and units that actually occupy extra cargo space are counted 2-3 times. See carrier picture, intented mount of units but wrong numbers.

2. Also promoting ship without starting cargo space displays double but working as intented otherwise. See destroyer picture

This is from Stolenrays thread, AND2 seems to use different logic, it wont change the game behaviour but maybe it effects cargo space calculations..?
Example Entry in UnitInfos.xml:
Spoiler:
<SpecialCargo>SPECIALUNIT_FIGHTER,SPECIALUNIT_BOMB ER</SpecialCargo>
<iSpecialCargoSpace>3,1</iSpecialCargoSpace>
<DomainCargo>DOMAIN_AIR</DomainCargo>
<iCargo>1</iCargo>
<iTotalCargo>5</iTotalCargo>



Btw, did you noticed my techtree bug post? Thats funny bug and I checked my AND 1.75 copy and it was in back then also:) Picture is earlier in this thread in case you didint see it first time.

Thank you for your hard work! This is going to be best ever civ4 mod:goodjob:
 

Attachments

  • Civ4ScreenShot0003.JPG
    Civ4ScreenShot0003.JPG
    219.8 KB · Views: 102
  • Civ4ScreenShot0004.JPG
    Civ4ScreenShot0004.JPG
    202.8 KB · Views: 84
I am unable to attack with my carrier based stealth fighter for some reason.
I have been attacking and have reduced the mechanized infantry to their minimum with my carrier based stealth fighters this turn but are now prevented from continuing the attack.
If I attack with ground forces based on the fleet they are able to attack however they face nlos cannons at full strength and have no chance to prevail.
 
45°38'N-13°47'E;13631433 said:
I think this is because CvMADNukesManager.py gets UnitIDs and CityIDs here

Code:
		for iUnitID in range(gc.getPlayer(gc.getGame().getActivePlayer()).getNumUnits()):
			objUnit = gc.getPlayer(gc.getGame().getActivePlayer()).getUnit(iUnitID)

and here

Code:
		for iCityID in range(gc.getPlayer(iActivePlayer).getNumCities()):
			objCity = gc.getPlayer(iActivePlayer).getCity(iCityID)
			
			self.selectedCityHash[iCityID] = False;

Not sure what Afforess changed in the codes, but I can tell you even in BTS, this code will fail.

Under normal circumstances, this code is fine. But when a middle city is captured, the ID is screwed up.

For instance, Cities A to E, where A will be ID 0, while E will be ID 4. When City C is captured, number of cities will fall to 4, but City D and E will remain as ID 3 and 4 respectively. Hence, you loop through a range of 4, City ID 2 which used to be City C will be null, while City E is missed.

When a new City F is built, it will take up the missing slot though, so usually nobody will notice.

The solution is to use a while loop, or the inefficient pyhelper method, which uses the while loop and a for loop.
 
@dbkblk

gc.getCivilizationInfo(XXX).getAdjective(YYY) will do what you want, not sure how you test and fail in the C2C forum.

Tried with Maya in German for 0,1,2 and all work. See header.
 

Attachments

  • Adj 00000.JPG
    Adj 00000.JPG
    139.1 KB · Views: 88
  • Adj 10000.JPG
    Adj 10000.JPG
    139.5 KB · Views: 70
  • Adj 20000.JPG
    Adj 20000.JPG
    139.3 KB · Views: 121
gc.getCivilizationInfo(XXX).getAdjective(YYY) will do what you want, not sure how you test and fail in the C2C forum.
I don't think i use the right syntax.
The reduced code used in the DynamicCivNames is:
Code:
pPlayer = gc.getPlayer(iPlayer)
civInfo = gc.getCivilizationInfo(pPlayer.getCivilizationType())
curAdj = civInfo.getAdjective(1)
This code should change the civ names to the second form of adjective, instead of the first one.

How do you call the different forms ? by .getAdjective(0), (1), (2) ? Sorry for being a total beginner with Civ python code but i find it relatively undocumented.

EDIT: What part of code did you edit to change the title name of the civilopedia ? If i change
Code:
panelName = gc.getCivilizationInfo(self.iCivilization).getAdjective(1)
in SevoPediaCivilization.py, i get errors at launch.

EDIT2: Another thing i don't understand:
The API write: "CvCivilizationInfo getCivilizationInfo (INT idx)"
So, "pPlayer.getCivilizationType()" should give a INT, but "CivilizationType getCivilizationType ()" give a "CivilizationType". How am i supposed to know that "CivilizationType" is the right type i need to send to the first function ?

EDIT3: I must have done something wrong yesterday. I managed to make it to work with "gc.getCivilizationInfo(pPlayer.getCivilizationType()).getAdjective(1)". Thank you :)
 
Not sure which question you have not figured out yourself, since there are so many edits.

I don't use Sevo, but I assume panelname is just the name of a panel, usually the blue bar or box etc.
If you want to change the header, you look for the header section, which I believe BTS pedia use getDescription, while I use short desc instead. The adjective is just to illustrate.

getCivilizationType will return an int. In this case, it is used as a civilization type. But it is simply just an int which can be used for other purposes.

For instance, pPlayer.changeGold(pPlayer.getCivilizationType())
Will work perfectly, resulting in the player gold increased by his civ ID.
 
ART_DEF_UNIT_PIKEMAN_EUROPEAN is using the same Heavy Spearman graphic as the default Heavy Pikeman (ART_DEF_UNIT_HEAVY_SPEARMAN). Consequently, many European civs have identical graphics for normal and heavy pikeman.

And one extremely minor thing, the Civopedia Swordsman entry is missing.
 
Back
Top Bottom