Changing the Magic system

Casting limit seems an oddly confusing term. I'd use CurrentEnergy and MaxEnergy (energy is more generic than mana, and less confusing)

Sadly I'm not knowledgeable enough to answer your questions, but I like where this is going.
 
Ahh, ok, thank you very much. Sadly, I probably won't have time to look at this again until this weekend :(

-Colin
 
After some more banging of my head, I got annoyed and started thinking about some other things (allright, so much of the problem was that it is rather difficult to do programming while driving). Namely, what the heck I should do with this magic stuff once I get it working. This also brought up a few questions.

Firstly, how does damage resistance work in relation to direct damage spells. Specifically, I'm looking at things like fire resistance. When a unit does fire damage (say a fireball with 4 fire strength), and the unit attacked has fire resistance, then that unit is essentially fighting against a strength 2 unit (fire resistance is 50% reduction). However, how does fire resistance affect things like say, pillar of fire? Another possibly easier way to look at it is lightning resistance against maelstrom. Does it take off 50% of the damage that it does (say maelstrom does 30% damage, does it then do 15%) or does it remove 50% of the damage that would have been done (using pillar of fire here, if it does less than 50% damage, it ends up doing 0, but if it does more it reduces 50% of the damage off of it - so if it does 60% damage base, it only ends up actually doing 10%).

Another question along similar lines, how do the magic resistant promotions work. Do they reduce spell damage, or does it reduce damage done similar to how fire/lightning/etc. resistance work? If you're wondering what I'm talking about here, look at Baron Duin Halfmorn, and the promo that he starts out with (unless FF changed that... I can't remember as it has never really mattered).

The reason why I am asking is I came up with a few new spells (and a few spell changes), that bring more direct damage spells to the table, including some that are capable of actually killing, though those are restricted to archmage level spells. To counter their power, I was planning on putting in a few changes to the spell resistance. To start, there would be a spell resistance promotion that works much like now, but does a mere 10% resistance, available at KotE. Then another one that adds another 15% would become available at Sorcery. Specific resistances would be available after the first level one. I was also planning on adding a resistance promotion that replaces metamagic 1 (either 10% or 15%). While that counters direct damage, there isn't currently an answer to summons yet. As such, I was planning on changing dispell magic to (still dispell mana nodes) have a chance to dispell summons. I was thinking about giving it a base 30% chance, with each level of summoning that the opposing caster has reducing that chance by 5% (so a mage with summoning 5 will have more summons because he has more willpower, as well as having them be more difficult to dispell).

Another question, is there a way to target a specific tile with a spell (ex. if I want to shoot a lightning bolt, do I have to just give up and use maelstrom and strike everything nearby, or can I target 1 particular unit, or one particular stack).

Last question. This needs a touch of explanation. If an archmage has say, incinerate (new fire 3 spell, see it below), which costs 30 mana to cast, he would on his own be able to cast it at most about 3 times or so if he stacked up on mana. Would you find it OP if other units in the stack were able to sacrafice their mana to create a pool that any unit on the tile could use. This would mean that you could essentially have battery mages, and casting mages, and would allow said archmage to cast incinerate significantly more often (aka, he might be able to cast it a dozen times, or several dozen times if there were enough "Battery Mages" there). Specifically, I was thinking about this for the amurites, as something unique for them.

Now finally for some teasers, so you can all see some of what I was thinking about.
Air 1 - change from fair winds to lightning bolt, a spell that targets 1 unit within 2 squares, and does 5% damage (if possible, 5% air affinity damage), capped at 80% damage. While it has a high damage cap, i feel it isn't OP due to it only targeting 1 unit. Costs 10 mana.
Air 2 - Winds of flight - gives the flying promotion to the caster, 20 mana
Air 3 - Maelstrom, works as is, damaging everything around, but damage reduced to 10%, but cap increased to 80%. costs 30 mana
Fire 1 - summon pheonix, a strength 1+2 fire damage unit with flying, 2 moves, a first strike or two, and the ability to cast blaze (what fire 1 originally was). Costs 20 mana, 10 willpower
Fire 2 - as is, 20 mana
Fire 3 - Incinerate - does 50% damage or 25% fire affinity damage, uncapped, to one unit, and 10% damage, capped at 30% to the rest of the opposing stack.
Water 1 - as is, 10 mana
Water 2 - summon minor water elemental (strength 4 + 1 water affinity, starts with the weak promo - this is to affect their splitting behavior), 40 mana, 20 willpower
Water 3 - as is, 60 mana, 30 willpower
Earth 1 - as is, 10 mana
Earth 2 - changed to create a potion, that can be picked up and when used gives stoneskin, 20 mana
Earth 3 - as is, 60 mana, 30 willpower

Some examples of combination spells
Earth 1 + fire 1 - arcane forge, gives +10% production in city
Earth 2 + fire 2 - advanced arcane forge, gives 15% production in city (stacks with arcane forge)
Earth 3 + fire 3 - Arcane Factory, Gives +100% production in city (note, it requires that an archmage sit around in a city, just like as usual)

I have a bunch more ideas for other spell spheres and such, but I figured this might give you an idea of what I am thinking.

-Colin
 
I have been sitting down and working on adding parts to CvInfos, to allow the info to be read from the XML. I went with WarKirby's idea, and used the terms "MaxEnergy" to define the maximum amount of energy a caster has, and "EnergyCost" to define how much mana a spell would cost.

So far, I have added a few DLL lines for CvPromotionInfo.
Spoiler :
Code:
added to CvPromotionInfo::CvPromotionInfo() :
	m_piMaxEnergy(0),
	m_piEnergyCost(0),
added to CvPromotionInfo::~CvPromotionInfo()
	//SAFE_DELETE_ARRAY(m_piMaxEnergy); needed? unknown
	//SAFE_DELETE_ARRAY(m_piEnergyCost); needed? unknown
	will ask later if this is needed
created
int CvPromotionInfo::getMaxEnergy() const
{
	return m_piMaxEnergy ? m_piMaxEnergy[i] : -1;
}
int CvPromotionInfo::getEnergyCost() const
{
	return m_piEnergyCost ? m_piEnergyCost[i] : -1;
}
Added to CvPromotionInfo::read(FDataStreamBase* stream)
	stream->Read(&m_piMaxEnergy);
	stream->Read(&m_piEnergyCost);
Added to CvPromotionInfo::write(FDataStreamBase* stream)
	stream->Write(m_piMaxEnergy);
	stream->Write(m_piEnergyCost);
Added to CvPromotionInfo::read(CvXMLLoadUtility* pXML)
	pXML->GetChildXmlValByName(&m_piMaxEnergy, "MaxEnergy");
	pXML->GetChildXmlValByName(&m_piEnergyCost, "EnergyCost");
Added to CvPromotionInfo::copyNonDefaults(CvPromotionInfo* pClassInfo, CvXMLLoadUtility* pXML)
	if (getMaxEnergy()	== 0) m_piMaxEnergy	= pClassInfo->getMaxEnergy();
	if (getGetEnergyCost()	== 0) m_piEnergyCost	= pClassInfo->getEnergyCost();

From what I understand this should allow these as variables that can be put into the promotion catagories. However, should I be moving "EnergyCost" to CvSpellInfo::CvSpellInfo() :, or should I be adding a different variable here?

Then, once I have added all this, what do I need to add to the header file?

-Colin
 
Ok, I have now finished adding everything that I currently want to to the DLL (at the moment, modifying CvInfos), and am ready to try to compile it. To change the code, I am currently using Microsoft Visual C++ 2008 express edition. Do I just straight up follow the instructions that came with the makefile found in Visual Studio 2008 Express with Refar's guide here, or is there anything else that I need to know that Fall Further changed that will affect this?

-Colin
 
You are trying to treat this as an array in a few places. I imagine you are cloning another variable at each step early on, thus getting confused.

This is a straight integer, each promotion has a single value for each of these 2 fields. So I advise you rename the variables to just be m_i____ instead of m_pi____

Then ditch the lines in CvPromotionInfo::~CvPromotionInfo(), and in the ::get___() functions, just use a flat "return m_i____;" line. Those are the only two locations where you accidentally treated it like an array.
To set up VS, you can follow Refar's guide, but use the makefile which was provided with the source code for FF, we added some files, so have a different makefile. As long as you use our makefile, everything else works just like he explains though.
 
Back
Top Bottom