Help Wanted Ads

The file with the languages can be named anything as long as its name ends with Civ4GameText and is type XML. Most of us start off with our name as the rest of the file name. Which is why called the file I sent you what I did. The file itself either goes in the mod you are working on or in the XML/Text folder. Which ever is better for you since you will probably be maintaining it. ;)

All the file does is provide the correct language text in place of the TXT_ wherever it is used.

I thought you had already made it that way by putting the TXT_ name in the barbarian city list.

Oh, I see. OK, then. :D

EDIT: Finished.
 

Attachments

I need a "coder" to inform me what Exactly this is doing? thx. And is it still correctly done?

Spoiler :
Code:
######## HIYOSILVER ###########

def canTriggerHiyoSilver(argsList):

  kTriggeredData = argsList[0]
  player = gc.getPlayer(kTriggeredData.ePlayer)
  
  iSilver = gc.getInfoTypeForString("BONUS_SILVER")
  iHappyBonuses = 0
  bSilver = false
  for i in range(gc.getNumBonusInfos()):
    bonus = gc.getBonusInfo(i)
    iNum = player.getNumAvailableBonuses(i)
    if iNum > 0 :
      if bonus.getHappiness() > 0:
        iHappyBonuses += 1
        if iHappyBonuses > 5:
          return false
      if i == iSilver:
        return false

  plot = gc.getMap().plot(kTriggeredData.iPlotX, kTriggeredData.iPlotY)
  if not plot.canHaveBonus(iSilver, false):
    return false
        
  return true
 
I need a "coder" to inform me what Exactly this is doing? thx. And is it still correctly done?

Spoiler :
Code:
######## HIYOSILVER ###########

def canTriggerHiyoSilver(argsList):

  kTriggeredData = argsList[0]
  player = gc.getPlayer(kTriggeredData.ePlayer)
  
  iSilver = gc.getInfoTypeForString("BONUS_SILVER")
  iHappyBonuses = 0
  bSilver = false
  for i in range(gc.getNumBonusInfos()):
    bonus = gc.getBonusInfo(i)
    iNum = player.getNumAvailableBonuses(i)
    if iNum > 0 :
      if bonus.getHappiness() > 0:
        iHappyBonuses += 1
        if iHappyBonuses > 5:
          return false
      if i == iSilver:
        return false

  plot = gc.getMap().plot(kTriggeredData.iPlotX, kTriggeredData.iPlotY)
  if not plot.canHaveBonus(iSilver, false):
    return false
        
  return true

If the player has no silver, and has fewer than 5 happiness giving bonuses of any type, then if the plot the vent went off on can have a silver bonus add one.
 
If the player has no silver, and has fewer than 5 happiness giving bonuses of any type, then if the plot the vent went off on can have a silver bonus add one.

What IF i just wanted the plot to be a bonus tile only and no need for any other requirements? Meaning, i just want python to give me a bonus_?? and thats it:confused: But NOT on that tile that will give a resource/improvement etc.
 
What IF i just wanted the plot to be a bonus tile only and no need for any other requirements? Meaning, i just want python to give me a bonus_?? and thats it:confused: But NOT on that tile that will give a resource/improvement etc.

I'm not sure there is any way to just give a bonus without a source. I think (not completely sure though) that you have to give a source - so either a map resource or a building that provides a free bonus (you cold make it a speical building like diseases and crimes are I guess)
 
What IF i just wanted the plot to be a bonus tile only and no need for any other requirements? Meaning, i just want python to give me a bonus_?? and thats it:confused: But NOT on that tile that will give a resource/improvement etc.

Are you saying you want no conditions? Or (if I'm understanding this right) are you saying that the only condition you want to be that the tile doesn't already have a resource or an improvement on it?

I think if you change the XML tag <PythonCanDo>canTriggerHiyoSilver</PythonCanDo> to <PythonCanDo/> it won't make those condition checks before it triggers.

I think a tag <BonusType>BONUS_??</BonusType> says to put a resource on the tile.

EDIT: Thanks to Koshling's X-post I get what the question was. It was to get a resource without a resource bonus on a tile. Is that correct, SO?

EDIT2: The event could build a building that gave the resource if we had such a building. An event can change yields of an already built building, but cannot, as far as I can tell, add the ability to produce a resource to an already built building (If such a tag were to be created it might be called <BuildingExtraBonuses>).
 
Are you saying you want no conditions? Or (if I'm understanding this right) are you saying that the only condition you want to be that the tile doesn't already have a resource or an improvement on it?

I think if you change the XML tag <PythonCanDo>canTriggerHiyoSilver</PythonCanDo> to <PythonCanDo/> it won't make those condition checks before it triggers.

I think a tag <BonusType>BONUS_??</BonusType> says to put a resource on the tile.

EDIT: Thanks to Koshling's post I get what the question was. It was to get a resource without a resource bonus on a tile. Is that correct, SO?

Both actually.

HUH, come to think about it, it wouldn't make any sense to just have a bonus given freely, unbalanced infact?? Hmm:hmm:
 
Coders??? Is this OK to use for an event??

python?
Spoiler :
Code:
def CanTriggerUnfortunateAssassinCity(argsList):
	eTrigger = argsList[0]
	ePlayer = argsList[1]
	iCity = argsList[2]
	pPlayer = gc.getPlayer(ePlayer)
	pCity = pPlayer.getCity(iCity)
	if pCity.isCapital():
		return True
	return false

def doUnfortunateAssassin3(argsList):
	iEvent = argsList[0]
	kTriggeredData = argsList[1]
	pPlayer = gc.getPlayer(kTriggeredData.ePlayer)
	pdestPlayer = pPlayer
	minattitude=0
	for iLoopPlayer in range(gc.getMAX_PLAYERS()):
		pLoopPlayer = gc.getPlayer(iLoopPlayer)
		if pLoopPlayer.isAlive():
			if pLoopPlayer != pPlayer :
				test= CyGame().getSorenRandNum(100, "Pick CIV")
				if test > minattitude :
					pdestPlayer=pLoopPlayer
					minattitude = test
	if CyGame().getSorenRandNum(100, "Pick Plot")<50 :
		pdestPlayer.AI_changeAttitudeExtra(kTriggeredData.ePlayer,-1)
	else:
		pdestPlayer.AI_changeAttitudeExtra(kTriggeredData.ePlayer,1)

def helpUnfortunateAssassin3(argsList):
	iEvent = argsList[0]
	kTriggeredData = argsList[1]
	szHelp = localText.getText("TXT_KEY_EVENT_UNFORTUNATE_ASSASSIN_3_HELP", ())
	return szHelp

def doUnfortunateAssassin5(argsList):
	iEvent = argsList[0]
	kTriggeredData = argsList[1]
	pPlayer = gc.getPlayer(kTriggeredData.ePlayer)
	pCity = pPlayer.getCity(kTriggeredData.iCityId)
	newUnit1 = pPlayer.initUnit(gc.getInfoTypeForString('UNIT_ASSASSIN'), pCity.getX(),pCity.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)

def helpUnfortunateAssassin5(argsList):
	iEvent = argsList[0]
	kTriggeredData = argsList[1]
	szHelp = localText.getText("TXT_KEY_EVENT_UNFORTUNATE_ASSASSIN_5_HELP", ())
	return szHelp
 
besides the fact that you haven't tested if either player is the Barbarian player .

Meaning? More code needed then?? Would this give me an Assassin also?
 
Does the auto build function the the religion requirements into account? IE
  • ReligionType - the religion specified must be present in the city
  • StateReligion - State Religion is the religion specified
  • bStateReligion - 1=must have a state religion but it can be an religion

If it does the converting the "Faces of God" mod becomes a whole lot easier.
 
Does the auto build function the the religion requirements into account? IE
  • ReligionType - the religion specified must be present in the city
  • StateReligion - State Religion is the religion specified
  • bStateReligion - 1=must have a state religion but it can be an religion

If it does the converting the "Faces of God" mod becomes a whole lot easier.
Yes, it is currently quite simple:
At the beginning of the turn of a city if a building has auto build set and you can construct it (ignoring hammer cost), then it is automatically constructed.
So everything that influences your ability to construct a building is also taken into account for autobuild.
 
Dont know who needed something like this??

I already made a button/icon for ls612 which uses a symbol of a house. I think its better to use pictures and symbols rather than text due to the fact people who read the mod in other languages would not have a button translated for them.

Not sure why ls612 did not already apply my button. If he doesn't like it he should tell me so I can make another one.
 
I already made a button/icon for ls612 which uses a symbol of a house. I think its better to use pictures and symbols rather than text due to the fact people who read the mod in other languages would not have a button translated for them.

Not sure why ls612 did not already apply my button. If he doesn't like it he should tell me so I can make another one.

I thought I did in one of my commits yesterday. :confused:

Edit: Yes I did.

Code:
		<MissionInfo>
			<Type>MISSION_GOTO</Type>
			<Description>TXT_KEY_MISSION_GOTO</Description>
			<Help>TXT_KEY_MISSION_GOTO_HELP</Help>
			<Waypoint>NONE</Waypoint>
			<iTime>0</iTime>
			<bTarget>0</bTarget>
			<bBuild>0</bBuild>
			<bSound>0</bSound>
			<HotKey>KB_V</HotKey>
			<bAltDown>0</bAltDown>
			<bShiftDown>1</bShiftDown>
			<bCtrlDown>1</bCtrlDown>
			<iHotKeyPriority>0</iHotKeyPriority>
			<bAltDownAlt>0</bAltDownAlt>
			<bShiftDownAlt>0</bShiftDownAlt>
			<bCtrlDownAlt>0</bCtrlDownAlt>
			<iHotKeyPriorityAlt>0</iHotKeyPriorityAlt>
			<bVisible>1</bVisible>
			<Button>Art/Interface/Buttons/Actions/Discover.dds</Button>
		</MissionInfo>
 
I thought I did in one of my commits yesterday. :confused:

Edit: Yes I did.

I will go update but last time I checked it had the icon/button of the "Lightblub" like you were going to bulb a free tech.

EDIT: This is not the right icon button. You have the lightblub.

<Button>Art/Interface/Buttons/Actions/Discover.dds</Button>

It should be called "gotocity.dds" and at whatever location you put the button.

Note the icon/button can be found here.

EDIT2: In the 3 times (v5187, v5191 & v5194) you edited the SVN since I posted them, you added code but not the new icon/button I made for you.
 
Back
Top Bottom