Random Events

Thanks!

Is there a Farm Camp or something similar? A general building that could get a :food: boost from the Farm Plows event?

Also, where do I find the Metal Forges/smelter or just: whats the tag for Iron Forge?

Hydro, you just reworked all Bombers... Which of these should get the Napalm Promotion from the Napalm event?
 
I already fixed that. That and 246 other events :hammer2:
It's still in progress, but at the end of the week I should be able to commit them to the SVN. After that, new games should have more events (not more frequent but more diverse) and there should not be one event that is repeat again and again...
 
@Faustmouse I have changed the code for volcanoes. Please point the event at
doVolcanoNewEruption for a new volcano - this code is wrong I forgot the most important bit.:blush:
doVolcanoExistingEruption if an existing active volcano erupts again.
doVolcanoDormantEruption if a dormant volcano erupts.​

the others should remain the same. (doVolcanoExtinction and doVolcanoSleep)


You may be able to clean up the event code also now.
 
What do you mean by "point the event at..."?

And there are approximate 1000 volcano related events :crazyeye:
Could you probably make a seperate folder with all the volcano related events (and the used python)? this would make it way easier to have a closer look at it and clean it up.
 
If you don't seperate them, can you hold off for now? I copied the whole event/eventTriger file and made over 1000 changes. It would be a hell to merge these to your volcano changes :sad:
I should be able to commit them either this evening or tomorrow evening (Brisbane time).
 
If you don't seperate them, can you hold off for now? I copied the whole event/eventTriger file and made over 1000 changes. It would be a hell to merge these to your volcano changes :sad:
I should be able to commit them either this evening or tomorrow evening (Brisbane time).

OK that is fine. I need to do some testing anyway.
 
Great! I want to modify the python now. Is there a way to see if there are any errors in there?

And I want the code for "if you have more then 2*Default Player Swordman (Normal, light and Heavy). Is this correct:

Code:
  iNumUnits = gc.getWorldInfo(gc.getMap().getWorldSize()).getDefaultPlayers() * 2
  iUnitClassTypeLightSwordman = gc.getInfoTypeForString("UNITCLASS_LIGHT_SWORDSMAN")
  iUnitClassTypeSwordman = gc.getInfoTypeForString("UNITCLASS_SWORDSMAN")
  iUnitClassTypeHeavySwordman = gc.getInfoTypeForString("UNITCLASS_HEAVY_SWORDSMAN")
  if iUnitClassTypeLightSwordman + iUnitClassTypeSwordman + iUnitClassTypeHeavySwordman < iNumUnits:
    return false
      


  return true

Edit:
Ok that's all then. Once this issues are solved I can commit the event changes :)

Edit2:
Also found some of the game texts that needed to be changed. But not all. Any idea where the game text for "Marble Statues" and "Stained Glass" is?
 
I was about to test them ingame but appearently there is an error in the EventInfo. My XML tool is not helpful, it just tells me that there is an error somewhere between Line 10 and 46.153 or something. Could one of you have a look? Or better, name a good XML error finder (I'm using an XML tool for Notepad++).
Beside this (and the Swordman Code and 2 Game texts) I'm done for now. There are some other tweeks, but they can wait until you merged the vulcanos in.
 

Attachments

Great! I want to modify the python now. Is there a way to see if there are any errors in there?

And I want the code for "if you have more then 2*Default Player Swordman (Normal, light and Heavy). Is this correct:

Code:
  iNumUnits = gc.getWorldInfo(gc.getMap().getWorldSize()).getDefaultPlayers() * 2
  iUnitClassTypeLightSwordman = gc.getInfoTypeForString("UNITCLASS_LIGHT_SWORDSMAN")
  iUnitClassTypeSwordman = gc.getInfoTypeForString("UNITCLASS_SWORDSMAN")
  iUnitClassTypeHeavySwordman = gc.getInfoTypeForString("UNITCLASS_HEAVY_SWORDSMAN")
  if iUnitClassTypeLightSwordman + iUnitClassTypeSwordman + iUnitClassTypeHeavySwordman < iNumUnits:
    return false
      


  return true

Not sure what you are trying to do, but I can guarantee the above will definitely not do whatever you want to do.

You are just adding up all the various unit class IDs
 
I was about to test them ingame but appearently there is an error in the EventInfo. My XML tool is not helpful, it just tells me that there is an error somewhere between Line 10 and 46.153 or something. Could one of you have a look? Or better, name a good XML error finder (I'm using an XML tool for Notepad++).
Beside this (and the Swordman Code and 2 Game texts) I'm done for now. There are some other tweeks, but they can wait until you merged the vulcanos in.

In EVENT_CHARIOTRY_FOUNDED_2 you are not ending BuildingExtraCommerces. You have <BuildingExtraCommerces> when you should have </BuildingExtraCommerces>.

Not sure what you are trying to do, but I can guarantee the above will definitely not do whatever you want to do.

You are just adding up all the various unit class IDs

That is what I thought:lol:
 
Thanks DH!

Oh sorry! The whole code looks like this:

Code:
def canTriggerEliteSwordsDone(argsList):
  kTriggeredData = argsList[0]
  player = gc.getPlayer(kTriggeredData.ePlayer)
  
  iNumUnits = gc.getWorldInfo(gc.getMap().getWorldSize()).getDefaultPlayers() + 1
  iUnitClassType = gc.getInfoTypeForString("UNITCLASS_LIGHT_SWORDSMAN")
  if player.getUnitClassCount(iUnitClassType) < iNumUnits:
    return false
      
  return true
Right now. I want it to change so that not only light Swordman but all of them count towards this goal.
 
I want it to change so that not only light Swordman but all of them count towards this goal.

Is this what you mean? I a not sure I have the correct names :D.
Code:
def canTriggerEliteSwordsDone(argsList):
  kTriggeredData = argsList[0]
  player = gc.getPlayer(kTriggeredData.ePlayer)
  
  iNumUnits = gc.getWorldInfo(gc.getMap().getWorldSize()).getDefaultPlayers() + 1
  iUnitClassType = gc.getInfoTypeForString("UNITCLASS_LIGHT_SWORDSMAN")
  iUnitClassType2 = gc.getInfoTypeForString("UNITCLASS_SWORDSMAN")
  iUnitClassType3 = gc.getInfoTypeForString("UNITCLASS_HEAVY_SWORDSMAN")
  if player.getUnitClassCount(iUnitClassType)  + player.getUnitClassCount(iUnitClassType2) + player.getUnitClassCount(iUnitClassType3) < iNumUnits:
    return false
      
  return true
 
Because unit class id is like a street number.

If I want to know how many people are living in streets 1, 3 and 7, I have to do what Dh does.
What you are doing is add 1, 3 and 7 first and then trying to see how many are living in street 11 instead.
 
Yeah, most certainly.
So for Events, their are several things that limit their number:

a) total amount of events possible and not already obsolete)
b) events that are already occured and can't recourring
c) some events are global and can only happen once per game
d) events aren't active in 100% of all games (well, most of them)
e) some events have really weird requirements that limit them as well. For example: Must run Despotism while having a Christian Cathedral and also you must not have any Horse units.

But I think before worrying about events for the Galactic era we should flesh it out more.
 
Back
Top Bottom