Jump to content


Photo

BFME2 - Modding Power Requirements for CaH

mod bfme2 powers spells requirement createahero cah

  • Please log in to reply
21 replies to this topic

#1 Mr.Weck

Mr.Weck
  • Members
  • 14 posts

Posted 24 September 2014 - 11:33 AM

First off, I'm new here and already found a lot of useful info on BFME2 modding, so thanks for that!

 

Now to the real deal:

 

I'd like to mod the powers/spells requirement level for a CaH. Let me explain:

 

Take, for example the spell fireball:

 

Fireball lvl 1 requires: 

  • Level Requirement: 1
  • Spell Requirement: None

Fireball lvl 2 requires:

  • Level Requirement: 3
  • Spell Requirement: Fireball_lvl_1

Fireball lvl 3 requires:

  • Level Requirement: 7
  • Spell Requirement: Fireball_lvl_2

 

This all sums up to be our known spell/power tree.

 

Now what I want to do is change the order of the spells so that the strongest one is readily available for a lvl 1 hero. This means that even a power like "Word of Power", which has lvl 10 requirement would be available to a brand new, lvl 1 Create-a-Hero. How can I do that?

 

Thanks!



#2 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 24 September 2014 - 12:58 PM

	CreateAHeroUIAllowableUpgrades			  =	Upgrade_CreateAHero_ClassIstariWizard
	CreateAHeroUIMinimumLevel				  = 10
	CreateAHeroUIPrerequisiteButtonName =	Command_CreateAHero_SpecialAbilityTeleportLevel2
	CreateAHeroUICostIfSelected				  = CAH_TELEPORTLEVEL3_COST
Those lines in the commandbuttons of all the powers determine if they require other spells or levels.
Make the buttons have these two lines:
CreateAHeroUIMinimumLevel = 0
CreateAHeroUIPrerequisiteButtonName = None

And then it should work :p
Ridder Geel

#3 Mr.Weck

Mr.Weck
  • Members
  • 14 posts

Posted 25 September 2014 - 12:46 AM

Thanks for the quick reply Ridder. 
 
I tried itbut it doesn't work.
 
What I'm trying to do now is as follows

//------------------- Create A Hero ----------------------------
//--------------------------------------------------------------
CommandButton Command_CreateAHero_SpecialAbilityTeleportToCaster
	Command			   = SPECIAL_POWER
	SpecialPower	   = SpecialAbilityATeleportToCaster//SpecialAbilityTeleportToCaster		//	Name HACK - see special power
	Options			   = NEED_TARGET_POS CONTEXTMODE_COMMAND
	TextLabel		   = CONTROLBAR:TeleportLevel1
	ButtonImage		   = HSKingDainSummonRoyalGuard
	RadiusCursorType   = DominateRadiusCursor
	ButtonBorderType   = ACTION
	DescriptLabel	   = CONTROLBAR:ToolTipTeleportLevel1
	InPalantir		   = Yes
	
	CreateAHeroUIAllowableUpgrades	    =	Upgrade_CreateAHero_ClassIstariWizard
	CreateAHeroUIMinimumLevel	    =   7
	CreateAHeroUIPrerequisiteButtonName =   Command_CreateAHero_SpecialAbilityTeleportLevel2
End

//------------------- Create A Hero ----------------------------
//--------------------------------------------------------------
CommandButton Command_CreateAHero_SpecialAbilityTeleportLevel2
	Command			 = SPECIAL_POWER
	SpecialPower	 = SpecialAbilityStoreObjectsForLevel2Teleport
	Options			 = CONTEXTMODE_COMMAND NEED_TARGET_POS
	TextLabel		 = CONTROLBAR:TeleportLevel2
	ButtonImage		 = HSKingDainSummonRoyalGuard
	ButtonBorderType = ACTION
	DescriptLabel	 = CONTROLBAR:ToolTipTeleportLevel2
	InPalantir		 = Yes
	RadiusCursorType = DominateRadiusCursor
	
	CreateAHeroUIAllowableUpgrades	    =	Upgrade_CreateAHero_ClassIstariWizard
	CreateAHeroUIMinimumLevel	    =   3
	CreateAHeroUIPrerequisiteButtonName =	Command_CreateAHero_SpecialAbilityTeleportToCaster3
End

//------------------- Create A Hero ----------------------------
//--------------------------------------------------------------
CommandButton Command_CreateAHero_SpecialAbilityTeleportLevel3
	Command			 = SPECIAL_POWER
	SpecialPower	 = SpecialAbilityStoreObjectsForLevel3Teleport
	Options			 = CONTEXTMODE_COMMAND NEED_TARGET_POS
	TextLabel		 = CONTROLBAR:TeleportLevel3
	ButtonImage		 = HSKingDainSummonRoyalGuard
	ButtonBorderType = ACTION
	DescriptLabel	 = CONTROLBAR:ToolTipTeleportLevel3
	InPalantir		 = Yes
	RadiusCursorType = DominateRadiusCursor
	
	CreateAHeroUIAllowableUpgrades	    =	Upgrade_CreateAHero_ClassIstariWizard
	CreateAHeroUIMinimumLevel	    =   1
	CreateAHeroUIPrerequisiteButtonName =	None
End

As you can see, it should, in principle, work. But it doesn't. 

 

Could you help me sort it out?


Edited by Mr.Weck, 25 September 2014 - 12:57 AM.


#4 Mr.Weck

Mr.Weck
  • Members
  • 14 posts

Posted 25 September 2014 - 02:08 AM

Just to assure people that it CAN be done, here is the spell "Wizard Blast" in its final form (lvl 10). Though I have no idea whatsoever why it worked where other spell don't.

 

game_24_09_2014_22_59_45_394.jpg



#5 Mr.Weck

Mr.Weck
  • Members
  • 14 posts

Posted 25 September 2014 - 02:16 AM

It's me again. I figured maybe showing the error message could help, so here it is:

 

Desktop_24_09_2014_23_15_02_821.jpg



#6 Mr.Weck

Mr.Weck
  • Members
  • 14 posts

Posted 25 September 2014 - 02:51 AM

I messed around that a little bit more and this is what I discovered: it is possible to interchange positions of a same spell but not quite the level requirements. Let me try to explain it better;

 

 

LVL 1       |     LVL 3     |   LVL 7     |   LVL 10 

Fireball 1  | Fireball 2   |Fireball 3   |  

                 | Convert 1  | Convert 2 |Convert 3   

                 |                   |                 |    WoP

 

^ This is usual, how it is intended to be.

 

LVL 1       |     LVL 3     |   LVL 7     |   LVL 10 

Fireball 3  | Fireball 2   |Fireball 1   |  

Convert 3 | Convert 2   | Convert 1 |   

     WoP    |                   |                  |     

 

^ This is how I want it to be.

 

LVL 1       |     LVL 3     |   LVL 7     |   LVL 10 

Fireball 3  | Fireball 2   |Fireball 1   |  

                 | Convert 3  | Convert 2 |Convert 1   

                 |                   |                 |    WoP

 

^  This is what the game is allowing me to do.

 

Now, you could say "Sorry man there's nothing that can be done".  But I have already managed to do just that, exactly how I wanted, a few years back. What I don't understand is why can't I do it now?


Edited by Mr.Weck, 25 September 2014 - 02:55 AM.


#7 Mr.Weck

Mr.Weck
  • Members
  • 14 posts

Posted 26 September 2014 - 01:09 AM

BUMP



#8 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 26 September 2014 - 05:00 PM

Why are you editing the soundeffects.ini?
All you need to edit is the commandbutton.ini, and do exactly what i explained...
That's the logic behind it, and it should work, make sure your mod is being read by the game :p
CreateAHeroUIAllowableUpgrades = Upgrade_CreateAHero_ClassIstariWizard
CreateAHeroUIMinimumLevel = 10
CreateAHeroUIPrerequisiteButtonName = None
to
CreateAHeroUIAllowableUpgrades = Upgrade_CreateAHero_ClassIstariWizard
CreateAHeroUIMinimumLevel = 1
CreateAHeroUIPrerequisiteButtonName = None
Also, no need to bump your thread if there is no response within a day or such, I myself don't always have time to answer your problems, and others who might have time will read it even if you don't bump your topic, the topic is marked for everyone who didn't read it as unread, so bumping is quite unnecessary ;)

Edited by Ridder Geel, 26 September 2014 - 05:02 PM.

Ridder Geel

#9 Mr.Weck

Mr.Weck
  • Members
  • 14 posts

Posted 26 September 2014 - 07:37 PM

Sorry for the unnecessary bump ;/  anyway, I'm not editing soundeffects.ini it's just the error that shows sometimes when editing the spells. 

 

If you take a closer look at the editing I did to Command_CreateAHero_SpecialAbilityTeleportLevel3 you can see that I only changed 

 

  1. CreateAHeroUIMinimumLevel = 7
  2. CreateAHeroUIPrerequisiteButtonName = Command_CreateAHero_SpecialAbilityTeleportLevel2

 

To 

 

 

  1. CreateAHeroUIMinimumLevel = 1
  2. CreateAHeroUIPrerequisiteButtonName = None

 

The reason I edited the other levels was so that they can still be seen in the Hero Powers screen (I hope it makes sense).



#10 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 27 September 2014 - 10:37 AM

So did you change the prerequisites of the level 1 fireball then? Otherwise they most likely would show on another row in the power selection menu :p
Ridder Geel

#11 Mr.Weck

Mr.Weck
  • Members
  • 14 posts

Posted 27 September 2014 - 04:02 PM

So did you change the prerequisites of the level 1 fireball then? Otherwise they most likely would show on another row in the power selection menu :p

Yes, I did change the prerequisite of lvl 1 Fireball, because I want them to show on another row. I changed Fireball 3 to lvl 1 prerequisite, Fireball 2 to lvl 3 and Fireball 1 to lvl 7.

 

Now, they are like this:

 

Fireball lvl 3:

  • CreateAHeroUIMinimumLevel = 1
  • CreateAHeroUIPrerequisiteButtonName = None

Fireball lvl 2:

  • CreateAHeroUIMinimumLevel = 3
  • CreateAHeroUIPrerequisiteButtonName = Command_CreateAHero_Fireball_Level3

Fireball lvl 1:

  • CreateAHeroUIMinimumLevel = 7
  • CreateAHeroUIPrerequisiteButtonName = Command_CreateAHero_Fireball_Level2

 

It may be kind of hard understainding it only with text...



#12 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 29 September 2014 - 10:08 AM

Hm... Could you possibly upload your mod, and then give me the link so I can take a look? (Everything seems correct, so it strikes me as odd that it is not working) :p
Ridder Geel

#13 Mr.Weck

Mr.Weck
  • Members
  • 14 posts

Posted 29 September 2014 - 10:23 AM

Yes, surely. I'm am at work now, but as soon as I get home I'll upload it somewhere so you can have a look. I should say I'm using patch 1.08 and the file has 243 MB. Can I copy only the relevant part? 



#14 Mr.Weck

Mr.Weck
  • Members
  • 14 posts

Posted 29 September 2014 - 09:06 PM

Here it is http://pastebin.com/kUrS4bic

 

If you have any trouble, I can always upload it somewhere else. Thanks!



#15 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 29 September 2014 - 11:29 PM

Well doing exactly what you did works just fine here, are you sure the game is not reading some other file that might possibly be overwriting the commandbutton.ini? (which happened to me when i backed up my ini.big by renaming it, but keeping it in the game directory)
Because that would prevent what I told you to do from working :p
Ridder Geel

#16 Mr.Weck

Mr.Weck
  • Members
  • 14 posts

Posted 30 September 2014 - 02:03 AM

Sure some of them work. Some of them don't. I took the liberty of doing a spreadsheet with which worked - you can see it here: http://1drv.ms/1rxQUIj



#17 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 30 September 2014 - 11:09 AM

That's the thing, I got Word of Power at level 1...
Although that is quite an interesting list you got there... So some of them work, and some don't?
With work I assume you mean in the Create a Hero Creation screen itself right?
Ridder Geel

#18 Mr.Weck

Mr.Weck
  • Members
  • 14 posts

Posted 01 October 2014 - 02:42 AM

Exactly in the create a hero section, yes. Could you upload the section you edited so I can test it here?



#19 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 01 October 2014 - 01:05 PM

//------------------- Create A Hero ----------------------------
//--------------------------------------------------------------
CommandButton Command_CreateAHero_SpecialAbilityWordOfPower
    Command               = SPECIAL_POWER
    SpecialPower       = SpecialAbilityCreateAHeroWordOfPower
//    Options               =
    TextLabel           = CONTROLBAR:CAHWordofPower
    ButtonImage           = Gandolf_radcircle
    ButtonBorderType   = ACTION    
    DescriptLabel       = CONTROLBAR:ToolTipWordofPower_CAH
    AutoAbility           = Yes
    PresetRange           = 120.0
//    UnitSpecificSound  =
    InPalantir           = Yes

    CreateAHeroUIAllowableUpgrades              =    Upgrade_CreateAHero_ClassIstariWizard
    CreateAHeroUIMinimumLevel                  = 1
    CreateAHeroUIPrerequisiteButtonName = None
End

...That's it...


Ridder Geel

#20 Mr.Weck

Mr.Weck
  • Members
  • 14 posts

Posted 02 October 2014 - 12:25 AM

pw4JgkN.jpg

 

This is the error I get when using you code. :/






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users