FfH2 BtS Conversion Beta

Whilst your fiddling with spells, a long while back when you were figuring out how to make fireballs, I remember you wanted them to be air units but using the aircraft animation didn't really work. In Bts there are cruise missiles, which would work perfectly- have you considered switching fireballs to these?
 
Yeah, I'd love to do that, I just haven't fogured out how to do it in a reasonable manner yet, but it isn't for lack of trying.

I added a patch in the first post. It continues to build out the spell system, lots of good stuff in there for anyone looking to mod FfH2. These are the current Spell attributes:

Description
Civilopedia
Strategy
Help
PromotionPrereq1
PromotionPrereq2
UnitPrereq
bAllowAI- if the AI is allowed to use it
bInBordersOnly- if it can only be cast inside the players borders
bInCityOnly- if the can only be cast in cities
iAIWeight- Weighting modifier on AI spell selection
bDisplayWhenDisabled- if the spell will be displayed "grey" when it cant be cast (or not shown at all)
bHasCasted- if the spell marks the caster as having casted that turn
bIgnoreHasCasted- if the spell can be cast even if the player has already casted
bResistable- if the spell can be resisted
iRange- the range of the spell
iResistModify- modification to the target resist chances
iDamage- base damage form the spell
iDamageLimit- maximum damage the spell can do
DamageType- damage type the spell does (not enabled yet)
AddPromotionType1- promotion added by the spell
AddPromotionType2- promotion added by the spell
AddPromotionType3- promotion added by the spell
RemovePromotionType1- promotion removed by the spell
RemovePromotionType2- promotion removed by the spell
RemovePromotionType3- promotion removed by the spell
bBuffCasterOnly- if buff spells (add/remove promotions) only effect the caster
ConvertUnitType- if the spell transforms the caster into another unit type
CreateBuildingType- building created by the spell
CreateFeatureType- feature created by the spell
CreateImprovementType- improvement created by the spell
CreateUnitType- unit summoned
iCreateUnitNum- amount of the units that are summoned
bPermanentUnitCreate- if the summoned units are permanent
bImmuneTeam- if units on the players team are immune to the spell
bImmuneNeutral- if units that arent on the players team and arent at war with the player are immune to the spell
bImmuneEnemy- if enemy units are immune to the spell
bImmuneFlying- if flying units are immune to the spell
bImmuneNotAlive- if units that arent alive are immune to the spell
bDispel- if the spell dispels dispellable promotions
bPush- if the spell pushs effected targets away from the caster
bSacrificeCaster- if the spell destroys the caster
iImmobileTurns- how many turns the spell keeps effect units from moving
PyResult- if there is an entry here that function will be run when the spell is cast
PyRequirement- if there is an entry here that function will run to see if the spell can be cast
Effect- effect displayed when the spell is cast
Sound- sound played when the spell is cast

So for example, to create Entangle I just set: Range 1, ImmuneTeam, ImmuneNeutral, Resistable, ImmuneFlying, iImmobileTurns 1. So that will only hit non-flying enemy units, the unit is allow to attempt to resist the spell and if he fails he will be unable to move for one turn.

Rust has range 1, resistable, adds promotion rust, removes promotion bronze weapons, removes promotion iron weapons, removes promotion mithril weapons, immune team, immune neutral.

Etc etc. Lots of cool stuff to do, and I'll will be adding more attributes.

I also started checking the new FfH promotion attributes in. The following have been added and are activated (more will be coming):

bDispellable- if the promotion can be dispeled
bFear- if the promotion causes fear
bFlying- if the promotion allows the unit to fly (pass over all terrain types, set movement rate, ignores terrain cost)
bImmuneToFear- makes the unit immune to fear
bNotAlive- if the promotion makes the unit not alive
bRace- if the promotion sets the units race
bRemovedByCombat- if the promotion is removed by combat
bRemovedWhenHealed- if the promotion is removed when the unit is fully healed
bTwincast- if the promotion causes summons to be doubled
bValidate- if the promotion checks the unitcombat to make its valid, if not it removes itself
bWaterWalking- if the promotion allows the unit to travel over water tiles
iAIWeight- weighting on the AIs selection of promotions (also used by the spell system when it considers spells that add/remove promotions)
iCasterResistModify- casters modification to victims resist chances
iExpireChance- chance per turn the promotion will expire
iExtraCombatStr- modifier to the units strength
iFreeXPPerTurn- amount of experience points the unit gets per turn for free
iFreeXPFromCombat- amount of bonus experience the unit gets from combat
iResistMagic- modifier to the units resist chances
iSpellCasterXP- modifier to the rate spell casters gain xp
iSpellDamageModify- modification to damage done by all the casters spells
PromotionSummonPerk- if the promotion passes a promotion on to summons
BonusPrereq- if the promotion requires a bonus before it can be learned
PromotionPrereqOr3
PromotionPrereqOr4
PromotionPrereqAnd

Lots of fun stuff. Play with it, let me know about crashes and errors. There is more to come.
 
Yeah, I'd love to do that, I just haven't fogured out how to do it in a reasonable manner yet, but it isn't for lack of trying.

You probably have already tried this, but can you add war/peace status check to the damage routine? Then call a popup if you are in peace. Negative answer would stop the damage from the spell and return the ability to cast to the unit.
With no damage caused, this should not count as DoWing.

I don't have the source code here, so I'm writing only vaguely.
 
Downloaded, Going to start playing ASAP
 
Are we meant to play this as "normally" as possible and just report crashes or do we actively try to cause situations where crashes may occur?

or do we just hit "end turn" over and over again?
 
Playing normally is probably the best way.
 
Kael,

Looking back a couple of posts, I noticed the discussion on python and C++. It got me thinking about what is a good language for newbies to learn taking into account Civ IV. Any thoughts?

Thanks.
 
Kael,

Looking back a couple of posts, I noticed the discussion on python and C++. It got me thinking about what is a good language for newbies to learn taking into account Civ IV. Any thoughts?

Thanks.

Python is much easier to learn than C++.
 
I haven't had any crashing issues yet either.. but I haven't gotten to even half the spells yet, and it seems like a good chunk of them are missing components yet(like, no Temple building for Priest units)... but so far very stable.
 
Patch "b" is up and linked in the first post. I'll keep checking stuff in as long as you guys keep telling me that its working.

This patch brings a bunch more promotion functions in, some spells and all the traits except Adaptive, Sprawling and Insane.

There are also a few minor tweaks/fixes checked into this version. To keep the game from passing out hell terrain on world creation, animals from being killed when barbarians start, etc. Nothing major in this area, but a few things you may notice.

To this point Im continuing to run everything out of XML. So instead of the relaitvly simple code that says that if the attacker is diseased them there is a chance to spread disease to the units in the plot he attacks I added a "CombatApply" attribute to promotions so that if a unit attacks with a given promotion, the promotion defined in its "CombatApply" attribute has a chance of being applied to units in the other stack.

Although it takes quite a bit more time to write the system so that any attribute can be used I think its going to be a very good thing for modders who may one day want to create a rust monster who passes the rust promotion to enemy units, etc etc.
 
Just wanted to say that I tested patch a used the advanced start option, played for some turns, created some mages, casted some spells, played some more turns and... no crashes!

P.S.: Kael, I'm quite impressed how you put everything neatly into the SDK - the final Dll seems to become so general that it could be the base for almost any (fantasy) mod. I'm more and more drawn to use it for doing my own mod - just have to put mana points for casters in (and overcome my lazyness ;-) ).
 
I know you're not big on bugs right now, but there is an odd new behavior introduced in "b". It seems every unit has the subdue animal ability, with out the appropriate promotion or tech. Also the animals once subdued are still forced to follow animal movement rules, even after declaring nationality. Unable to enter cultural borders, and cannot touch resources.
 
I know you're not big on bugs right now, but there is an odd new behavior introduced in "b". It seems every unit has the subdue animal ability, with out the appropriate promotion or tech. Also the animals once subdued are still forced to follow animal movement rules, even after declaring nationality. Unable to enter cultural borders, and cannot touch resources.

Yeah, there needs to be an SDK change to only have those animal movement rules applied to barb animals. But the other (everyone able to subdue) is probably something I did wrong. I will check it out.

@cfe: I think when its all said and done it will be very useful for more than just fantasy mods. Theme has nothing to do with mechanics. Command and the Disease mechanics (percentage chance to capture units, and pushing promotions onto enemies in combat) could be used to allow the Borg to take enemy ships and put a hivemind or cyborg promotion on them. A historical mod can use the spell system to give units the ability to break into smaller less powerful milita units or join them into legions, combat promotions could be used to make units become fatigured if they arent supplied, etc etc.
 
Hm, I think I'll wait a few more iterations before trying the BTS version of FfH. Sounds like things are going well so far, though.

I can't wait to try playing Ljosalfar with the new 'Arboria' mapscript, or Khazad with 'Global_Highlands', or Doviello with 'Boreal'.
 
[...]
@cfe: I think when its all said and done it will be very useful for more than just fantasy mods. Theme has nothing to do with mechanics. Command and the Disease mechanics (percentage chance to capture units, and pushing promotions onto enemies in combat) could be used to allow the Borg to take enemy ships and put a hivemind or cyborg promotion on them. A historical mod can use the spell system to give units the ability to break into smaller less powerful milita units or join them into legions, combat promotions could be used to make units become fatigured if they arent supplied, etc etc.

That's the reason I put the fantasy in parentheses :D - I just didn't have any concrete idea what could be done. Although I see now that e.g. the spell system can be used for every special ability any unit could have - that could get interesting...
 
Back
Top Bottom