Simple Python Things

Just curious, which units are chosen of yours to kill, to kill the enemy ones.
Isnt it sad if I lost a general attached unit just to kill 3 enemy flies due to the event?

Perhaps units above a certain level/experience will be avoided?
 
Selection is random.
The only restriction is that the unit must have a combat strength >0, so that you don't lose by accident settlers, workers and GPs.
Ignoring units above a certain level is probably a good idea, will add that :).
mmhh...10 or 15 XP is probably a good cut off level, I guess.
 
I think it should probably be strictly a modern event since it simply would not happen much earlier since it would be dificult to send ur troops in the middle of the enemies land wothout them noticing

if you keep it only modern i would say you can not give gunpowder units since you wouldnt send soldier, you would send tanks, artillery etc etc
 
mmhh...could tie the sent units to the same era (or later) like the prereq tech. Might be the easiest.

I would definatly atleast make sure that it does not happen in the ancient era.

If someone else has a suggestion for an event by all means use their idea, but I got two I think are good that I dont want to forget

-India wants to build a highway(or railroad, road etc) between one of their cities and one of yours. Assume you are the Germans
*Let them in right away and ensure that it is the fastest highway (or raildroad, road etc) in the world! (-100 gold, requires open borders already between the two civs, all of those plots +1 movement, +1 relation between civs, builds raod between cities. I dont know if +1 movement can be done)
*Definatly! But to let in their workers we will need to sign an open borders pact (Requires no open borders to start with, starts open border between two civs, builds road)
*Tell them we will let them build it, then capture their workers! (+1 worker, - relation between civs)
*We will never work with the Indian Empire!
Plays message "The Indian Empire is hoping to build the great Indian-German highway."

-The Indian Empire wants to join civilization with us. (Required that neither civ is top 3 in score[Since superpower would not do this, and to restrict it from happening in small games], neither can be vassel, Indian civ can not be player, etc)
*Conjoing our empires is a great idea! (All of India becomes Germany, culture and units and everything. German civ renamed to "German-Indian Empire", all other things renamed as well.)
*We are to strong to be dragged down by the Indian Empire, but possibly they would be interested in becoming our vassel (10% chance India becomes Germany vassel)
*Absolutely not.

Also quick question. Do you think that your event for spawning a war would be less taxing on game preformance then a python check each turn to check for a scenario then gameturn? Since when I got 20 scenarios in the future I don't want to be running 20 checks a turn so do you think the events are a better option?
 
First: Sorry for the delay :blush:.
Had a job interview today (was bad...), and had to prepare some stuff before, and other RL got in as well :ack:. And sadly you can't expect the stuff in the next days, because tomorrow we have G&K release (and on Friday too), so I guess I'll be busy moderating :ack:.


@ events:
#1: Path finding is a complicated thing. Tried that stuff with the road already once for a wonder, didn't really work.

#2: Civs can't be renamed.
Event might be pretty OP if there are no disadvantages.

@war: No concrete idea, but since the events are done via the Dll, I'd expect that they are faster.
 
no wonder the AI are so bad at pathfinding then :p
 
First: Sorry for the delay :blush:.
Had a job interview today (was bad...), and had to prepare some stuff before, and other RL got in as well :ack:. And sadly you can't expect the stuff in the next days, because tomorrow we have G&K release (and on Friday too), so I guess I'll be busy moderating :ack:.


@ events:
#1: Path finding is a complicated thing. Tried that stuff with the road already once for a wonder, didn't really work.

#2: Civs can't be renamed.
Event might be pretty OP if there are no disadvantages.

@war: No concrete idea, but since the events are done via the Dll, I'd expect that they are faster.
Of course RL things come first, so no problem at all:D

suprising civs can't be renamed. Im pretty sure the event is in revolutions mod or Rhyses and Fall or something (im sure its not via python though) GEM is where I saw it. Basically a small civ (It was switzerland during WW2, so probably a one or two city civ) says they would rather be under your protection, and become your cities. The downside is obvoius, the same reason AI rarely want to take your cities via trade because it costs money to keep the cities. Just have two options, accept them or don't accept them. Not all events should have downside since plenty don't, or don't have any positive (nothing ever good comes out of the fire event :lol:)

@ war, i will probably start scripting those events through that then since it will definatly be faster
 
The renaming can be done, but only with SDK modifications, not in vanilla Bts :(.

Still not sure if joining will be balanced, but well, you can still add some XML modificators like money.

Definatly dont want sdk:lol:

I get what your point is for it not being balanced, but not sure why events need to be
Ways to balance it though:
*Revolts in the new cities for several turns
*Redue event so the civ giving up is in a horrible economic shape and needs you to dump money into their economy so it costs you a bunch of gold
*Diplomatic hit for civs that are not happy with civ giving up
*Have it so the civ giving up needs to be at war and is getting recked (usually you can tell if they only have 1 or 2 cities) and you automatically go to war with that civ, so thats.

I think a combination of the last two are best. So this is how it plays out: Germany invading India and is about to win and has htem down to one or two cities. India looks to the neiboring celts for help. Celts say yes, go to war with germany and absorbs India, and anyone who hates india, now gets -1 diplomacy with Celts.
 
well dacubz, the civnaming method I could easy find and expose to python so that you or The_J can use it. After I give you your debug DLL I can expose it for a release DLL if you want. if you can get the description of a civ there will be the set methods to go with it :p
 
well dacubz, the civnaming method I could easy find and expose to python so that you or The_J can use it. After I give you your debug DLL I can expose it for a release DLL if you want. if you can get the description of a civ there will be the set methods to go with it :p

Going to be honust, no idea what you mean:crazyeye::lol:

Is there a method you know of or are you creating one in DLL im confused
 
Basically I will be able to create a method (probably) that can change a civ's description. I will then be able to expose it to python (make it a python method, some C++ stuff isn;t available to python). I will try and figure out how to do it if you want!
 
Civil war event is excellent. Yesterday I add to my mod :) Thanks :goodjob:
I may find some errors when will play next, but at this point, excellent :)
 
I have one question :)
I have event what add to the game in ancient era Kraken unit etc.
The problem is that the unit roams the sea and doing nothing. In xml I set
<bAlwaysHostile>1</bAlwaysHostile>
Unit ignore water improvements , ignore work boats ...
It is possible to set in python to make unit more aggressive?
 
How is the unit created in Python?
Because there is the option to give them different AIs, so that it will behave different.
Giving it UnitAITypes.UNITAI_ATTACK_CITY_LEMMING should make the unit attack the next best city, no matter what happens.
 
that is stereotyped against lemming :lol:. I think in python unit spawning cases the UnitAITypes should be set to NONE which then adopts the default AI of the unit (which you should check is correct in the XML itself, for example you don;t want the kraken with the explore ai (so wandering around doing nothing)
 
How is the unit created in Python?
Because there is the option to give them different AIs, so that it will behave different.
Giving it UnitAITypes.UNITAI_ATTACK_CITY_LEMMING should make the unit attack the next best city, no matter what happens.

It is water barbarian unit
Short code paste unit into game only ; in directions is NO_DIRECTION
 
Back
Top Bottom