Wonder area effect (Expansion of faith)

Modding, Map Editor, IES Scripting and Other Questions
User avatar
Gonzalo
Posts: 336
Joined: 24 Aug 2018, 08:56
Been thanked: 3 times

Wonder area effect (Expansion of faith)

Post by Gonzalo »

I have created a custom area effect for a wonder I have modded for Spanish Civilization (American) for EE4. I don't know if this is the problem, but now my wonder crashes the game in the editor and skirmish.
Here is my code for the area effect, called expansion of faith, and which intends to increase velocity of conversion by priest to all units by 500%:

Code: Select all

//------------------------------------------------
      ELPARDO (EPOCH 7)
      POWER: FAITH EXPANSION, VELOCITY OF CONVERSION IS INCREASED BY 500 %
//------------------------------------------------
//THIS EFFECT SIMULATES QUICK EXPANSION OF SPANISH EMPIRE DUE TO FAITH STRENGTH AND EVANGELISATION
DbAreaEffectInfo FaithExpansion
{
  	name = tx_warea_faithexpansion_name
	desc = tx_warea_faithexpansion_desc
 	effects = [
  		EffectFaithExpansion {
  			range = Global_Unit
			mask = Priests
  			player = Self

			targetPlayer = All

  			//velocity of conversion
  			velocity = 5

  		}
  	]
}
Any help will no doubt be honestly appreciated.

Added after 3 minutes 52 seconds:
My effect is very simple, but I don't intend anything more complex.

User avatar
Dr.MonaLisa
High Representative
Posts: 8697
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

Re: Wonder area effect (Expansion of faith)

Post by Dr.MonaLisa »

Where did you find the effect name "EffectFaithExpansion"?

It's not listed in hdrs.zip\DbHdrs\DbAreaEffectDefs.h nor EE2X_hdrs.zip\DbHdrs\DbAreaEffectDefs.h.


From what I understood, EE4 mod adds some new effect names to the game? How was it added? I thought it's very hardcoded.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
User avatar
Gonzalo
Posts: 336
Joined: 24 Aug 2018, 08:56
Been thanked: 3 times

Re: Wonder area effect (Expansion of faith)

Post by Gonzalo »

Sorry, I thought if you may easily change name of area effect, you also could change effect itself. I have in fact went too far. I just want to make so that this wonder makes priest convert enemy units five times quicker. If any way is to overcome or bypass this issue, and you know it, please help me. Thank you.

Added after 4 minutes 50 seconds:
Perhaps EffectConversionTime?

Added after 14 minutes 15 seconds:
I don't know if scale must be a great cypher or a smaller one :)
User avatar
Dr.MonaLisa
High Representative
Posts: 8697
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

Re: Wonder area effect (Expansion of faith)

Post by Dr.MonaLisa »

I'm a bit confused, or we simply reached a new level of absurd.

You're complaining in the topic that your effect crashes the game, but you entered the non-existing, random effect name to it? So you used the English dictionary (or translator) and you put these words to the area effect, thinking that the game will understand what to do based on the inputted words? Are you believing that the game has some 2004 intelligent AI engine where it's possible to mod it using just the English words? What's next? Maybe you will record the mp3/wav file with instructions to the game what it should do?

EffectConversionTime should do the job.
Gonzalo wrote: 09 Jun 2022, 00:12I don't know if scale must be a great cypher or a smaller one :)
It's also explained in the game files:

Code: Select all

//Units affected by EffectConversionTime have the time it takes for them
//to convert units scaled by scale.
DATACLASS_INHERIT(EffectConversionTime, SubEffect)
float scale;		//what to scale conversion time by. (smaller = faster)
ENDCLASS
1.0 is default, 5.0 would be 5 x longer, 0.05 would be 20 times faster? I guess? Need to do some math.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
User avatar
Gonzalo
Posts: 336
Joined: 24 Aug 2018, 08:56
Been thanked: 3 times

Re: Wonder area effect (Expansion of faith)

Post by Gonzalo »

I thank your sarcastical help :)

Added after 1 minute 11 seconds:
Here is my new code (I don't know if it will go):

Code: Select all

DbAreaEffectInfo FaithExpansion
{
  	name = tx_warea_faithexpansion_name
	desc = tx_warea_faithexpansion_desc
 	effects = [
  		EffectConversionTime {
  			range = Global_Unit
			mask = Priests
  			player = Self

			targetPlayer = Unit

  			//velocity of conversion
  			scale = 0.0

  		}
  	]
}


Added after 1 minute 38 seconds:
And sorry, I in fact messed natural language with code, for I understand little the abstract cathegories (self, global_unit, etc).
User avatar
Dr.MonaLisa
High Representative
Posts: 8697
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

Re: Wonder area effect (Expansion of faith)

Post by Dr.MonaLisa »

Multiplication and division by 0 is not allowed in math. Even me, who hate math knows it.

So what do you think will be the result of this code?
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
User avatar
Gonzalo
Posts: 336
Joined: 24 Aug 2018, 08:56
Been thanked: 3 times

Re: Wonder area effect (Expansion of faith)

Post by Gonzalo »

No, it still doesn't work. :(
Sorry, I am bad at maths :/
User avatar
Gonzalo
Posts: 336
Joined: 24 Aug 2018, 08:56
Been thanked: 3 times

Re: Wonder area effect (Expansion of faith)

Post by Gonzalo »

Problem solved, the issue wasn't about effect, but about mistakes of spelling on the code of the unit...thanks for everything Mona.
User avatar
Loewenherz
Posts: 244
Joined: 23 Sep 2017, 17:26
Has thanked: 7 times
Been thanked: 21 times

Re: Wonder area effect (Expansion of faith)

Post by Loewenherz »

When will your mod actually be made available to the public? ^^
List of tutorials, useful threads and utilities (look here before posting): Here

Add Pics to Map: viewtopic.php?f=54&p=25184#p25184

Loews Work: viewtopic.php?f=54&t=5160
User avatar
Gonzalo
Posts: 336
Joined: 24 Aug 2018, 08:56
Been thanked: 3 times

Re: Wonder area effect (Expansion of faith)

Post by Gonzalo »

Hi, Loewenherz, thank you for your interest, I need to make up some things, and I will publish soon...thank you.
Post Reply

Return to “Questions”