Jump to content


Photo

Rainy Science + Ivory Tower's Power


  • Please log in to reply
16 replies to this topic

#1 ModdingMaster

ModdingMaster
  • Members
  • 17 posts
  • Location:France
  • Projects:Akatsuki's Mod
  •  Modding, Mapping, Codes, APT

Posted 07 March 2014 - 04:45 PM

Hello everybody I come back now because I have a problem, I'd like to create a power based on two powers. I exmplain : when I click on the power button, I'd like to see everything on the map (allies, enemies, gollum included) like the Ivory Tower's power/behavior but also trigger a rain like the Rainy Science power. I tried to merge the two modules of powers (with SpecialPower) but it did not work, I only  the farsight from the Ivory Tower's power but not rainy. Can you help me please, usually I'm not bad coding, but then I do many tests without results.

 

Thanks a lot. :)

 

NB : Sorry for my bad English, I'm just French LOL. ;) I hope it will.


bannia10.pngdacora10.png


#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 07 March 2014 - 07:38 PM

Considering that neither spell is a target spell you could use an OCL to spawn 2 eggs which each both trigger each spell separately, i hope this small explanation is of some use, currently on my mobile so cant really post any code to explain further... Just post here if you still need help and ill help with sample code when i can :)
Ridder Geel

#3 ModdingMaster

ModdingMaster
  • Members
  • 17 posts
  • Location:France
  • Projects:Akatsuki's Mod
  •  Modding, Mapping, Codes, APT

Posted 07 March 2014 - 10:00 PM

Thank you very much Ridder Geel for your answer, to save you post codes, I took the trouble to make :

 

In CommandSet.ini :

Command_SpecialAbilityFarsightRainy

In CommandButton.ini :

CommandButton Command_SpecialAbilityFarsightRainy
  Command                 = SPECIAL_POWER
  SpecialPower            = SpecialAbilityFarsightRainy
  TextLabel               = CONTROLBAR:FreezingRain
  ButtonImage             = SBEvil_FreezingRain
  DescriptLabel           = CONTROLBAR:ToolTipFreezingRain
  InPalantir		  = Yes
End

In SpecialPower.ini :

;------------------------------------------------------------------------------
SpecialPower SpecialAbilityFarsightRainy
  Enum			= SPECIAL_SPELL_BOOK_FREEZING_RAIN
  ReloadTime		= 10000
  InitiateSound		= ThunderStrikesStereo
  Flags			= RESPECT_RECHARGE_TIME_DISCOUNT
End

In Hero.ini :

Behavior = OCLSpecialPower ModuleTag_FarsightRainy
	SpecialPowerTemplate = SpecialAbilityFarsightRainy
	StartsPaused	     = No
	OCL                  = SpecialPowerFarsightRainy
	CreateLocation       = CREATE_AT_LOCATION
End

In OCL :

// ---------------------------------------------------------------------------------------
ObjectCreationList SpecialPowerFarsightRainy
  CreateObject
    ObjectNames = FarsightRainy
    Count = 1
  End
End

In System.ini :

//------------------------------------------------------------------------------
ChildObject FarsightRainy IvoryTowerVisionBase
	VisionRange     = MEN_FORTRESS_IVORY_TOWER_VISION_RANGE

	// Rainy
	Behavior = FreezingRainSpecialPower ModuleTag_Rainy
		SpecialPowerTemplate			= SpecialAbilityFarsightRainy
		AttributeModifierAffects		= ALL ENEMIES
		AntiCategory					= LEADERSHIP
		AttributeModifierWeatherBased	= Yes
		WeatherDuration					= SPELL_FREEZINGRAIN_DURATION
		ChangeWeather					= RAINY
		AvailableAtStart				= Yes
		BurnRateModifier				= -100
		BurnDecayModifier				= 20
	End	
End

Unfortunately I could not test this power-because I have a serious problem with my INI.big, it no longer accepts changes (Windows 8 may be). So if you can just look at the syntax of the code, see if it seems good to you.

 

For information, I'm not new to modding, so you can talk to me I should technical enough to understand, I came to ask for help from my English and American colleagues. LOL ;)

 

Thanks for your answer. :)


bannia10.pngdacora10.png


#4 ModdingMaster

ModdingMaster
  • Members
  • 17 posts
  • Location:France
  • Projects:Akatsuki's Mod
  •  Modding, Mapping, Codes, APT

Posted 07 March 2014 - 11:29 PM

Hi, I have a new, I managed to be able to run this power, but I found the problem I had at the start (because yes I had already tried this power), I have far sight (ivory tower's power) but I still did not rain (freezing rain's power), despite this module rain that I you have shown in the code. Do you have an idea please?

 

Thanks. :)


bannia10.pngdacora10.png


#5 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 08 March 2014 - 12:40 AM

Well you need to also make sure that you trigger that power when the object is placed :)

I believe you can do this using the DoCommandUpgrade module, not sure if there is a sample of it anywhere... maybe in the ents or troll inis :p


Ridder Geel

#6 ModdingMaster

ModdingMaster
  • Members
  • 17 posts
  • Location:France
  • Projects:Akatsuki's Mod
  •  Modding, Mapping, Codes, APT

Posted 08 March 2014 - 10:09 AM

Ok so I understand your proposal, I also found the DoCommandUpgrade module in TreeBeard that here :

// When created, automatically switch to rock-throwing
	Behavior = DoCommandUpgrade Module_DoCommandUpgrade	
		TriggeredBy = Upgrade_SwitchToRockThrowing
		GetUpgradeCommandButtonName = Command_ToggleTreebeardRockThrow
	End

By cons I have not figured out how to implement it in my power so that I can harness the power of the rain.

 

If you can help me I will, but take your time, it's not urgent. ;)

 

Thanks. :)


bannia10.pngdacora10.png


#7 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 08 March 2014 - 02:09 PM

Make the power use a different special power, and then add a commandset to the object, and use the commandbutton trigger to trigger that ability :) Make sure it also gets an upgrade to trigger it, so the object will need to get an upgrade when created, this can be done through the experiencelevels.ini :p

(On a side note, why is your name Modding Master :p Kinda gives a fairly odd impression as if you know it all ;) ) :p


Ridder Geel

#8 ModdingMaster

ModdingMaster
  • Members
  • 17 posts
  • Location:France
  • Projects:Akatsuki's Mod
  •  Modding, Mapping, Codes, APT

Posted 08 March 2014 - 03:16 PM

Okay, I'll try it right away. My nikename is ModdingMaster because it's been five and a half years I practice modding and trust me I have a good experience. I touch all, codes, textures, graphics, sounds, mapping, and now interfaces (APT), but I happen to have some problems because I can not know everything. English is not easy for me even though I love this language (especially for modding). ;) But if you want a scale, look at this :

 

- Codes : ~50%

- Graphics : ~25% / Animations : ~5%

- Mapped images + Textures : ~35%

- Sounds : ~60%

- Mapping : ~45%

- Interfaces (APT) : ~15%

 

Approximately ! ;)

 

I bow before you, you have teams, you often edit mods, but I knew answer many questions on my forum, here : http://imladrisprodu...motion.com/u500

 

I still have much to learn, BFME never die ! ;)


bannia10.pngdacora10.png


#9 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 08 March 2014 - 04:13 PM

Ghehe owkay, cool :) Nice to have you here, another experienced modder is never a bad thing :)


Ridder Geel

#10 ModdingMaster

ModdingMaster
  • Members
  • 17 posts
  • Location:France
  • Projects:Akatsuki's Mod
  •  Modding, Mapping, Codes, APT

Posted 08 March 2014 - 06:34 PM

I'm sorry Ridder Geel but I absolutely understand your technique, I've never merged two powers together, I do not understand what you're trying to tell me. :sad2:

 

I think an example would help me (codes), but since you can not, it does not matter. :/

 

Thanks. :)


bannia10.pngdacora10.png


#11 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 09 March 2014 - 12:02 AM

Well if you give the FarsightRainy (object that you spawn) a experiencelevel which immediately grants that object an upgrade:

"Upgrade_Bla"

then having this module in the object:

Behavior = DoCommandUpgrade Module_DoCommandUpgrade    
  TriggeredBy = Upgrade_Bla
  GetUpgradeCommandButtonName = Command_Shalala
End

and then the commandbutton has:

"SpecialAbilityShalala"

or something that triggers the power you added in the object:

     Behavior = FreezingRainSpecialPower ModuleTag_Rainy
        SpecialPowerTemplate            = SpecialAbilityShalala
        AttributeModifierAffects        = ALL ENEMIES
        AntiCategory                    = LEADERSHIP
        AttributeModifierWeatherBased    = Yes
        WeatherDuration                    = SPELL_FREEZINGRAIN_DURATION
        ChangeWeather                    = RAINY
        AvailableAtStart                = Yes
        BurnRateModifier                = -100
        BurnDecayModifier                = 20
    End

Edited by Ridder Geel, 09 March 2014 - 12:02 AM.

Ridder Geel

#12 ModdingMaster

ModdingMaster
  • Members
  • 17 posts
  • Location:France
  • Projects:Akatsuki's Mod
  •  Modding, Mapping, Codes, APT

Posted 09 March 2014 - 10:44 AM

Thank you very much for helping me Ridder Geel, I tried your solution, it is true that the code that is clearer on. ;)

 

By cons I have a little problem, so I have the rain, but I when my hero out of the fortress only. This rain lasts 3 minutes as the classic power, then the rain stops, but I can not have it when I press the power button to see further. I done something wrong? I show you the code in full : ;)

 

CommandSet.ini :

Command_SpecialAbilityFarsightRainy

CommandButton.ini :

CommandButton Command_SpecialAbilityFarsightRainy
  Command                 = SPECIAL_POWER
  SpecialPower            = SpecialAbilityFarsightRainy
  TextLabel               = CONTROLBAR:FreezingRain
  ButtonImage             = SBEvil_FreezingRain
  DescriptLabel           = CONTROLBAR:ToolTipFreezingRain
  InPalantir		  = Yes
End

CommandButton Command_SpecialAbilityFarsightRainyUnseen
  Command                 = SPECIAL_POWER
  SpecialPower            = SpecialAbilityFarsightRainyUnseen
End

SpecialPower.ini :

;------------------------------------------------------------------------------
SpecialPower SpecialAbilityFarsightRainy
  Enum			= SPECIAL_SPELL_BOOK_PALANTIR_VISION
  ReloadTime		= 10000
  InitiateSound		= SpellPalantirVision
End

;------------------------------------------------------------------------------
SpecialPower SpecialAbilityFarsightRainyUnseen
  Enum			= SPECIAL_SPELL_BOOK_FREEZING_RAIN
  ReloadTime		= 10000
  InitiateSound		= ThunderStrikesStereo
End

In Hero.ini :

Behavior = OCLSpecialPower ModuleTag_FarsightRainy
	SpecialPowerTemplate = SpecialAbilityFarsightRainy
	StartsPaused	     = No
	OCL                  = SpecialPowerIvoryTowerVision
	CreateLocation       = CREATE_AT_LOCATION
End

Behavior = DoCommandUpgrade Module_DoCommandUpgrade    
  TriggeredBy = Upgrade_FarsightRainy
  GetUpgradeCommandButtonName = Command_SpecialAbilityFarsightRainyUnseen
End

Behavior = FreezingRainSpecialPower ModuleTag_FreezingRain
	SpecialPowerTemplate			= SpecialAbilityFarsightRainyUnseen
	AttributeModifierAffects		= ALL ENEMIES
	AntiCategory				= LEADERSHIP
	AttributeModifierWeatherBased		= Yes
	WeatherDuration				= 30000 ; same time that ivory tower power duration. ;)
	ChangeWeather				= RAINY
	AvailableAtStart			= Yes
	BurnRateModifier			= -100
	BurnDecayModifier			= 20
End

Upgrade.ini :

Upgrade Upgrade_FarsightRainy
  Type              = OBJECT
End

And in ExperienceLevels.ini on my hero :

;----before----
Upgrades = Upgrade_FarsightRainy
;----after-----

I done something wrong? :)

 

Thanks for your help. :)


Edited by ModdingMaster, 09 March 2014 - 10:46 AM.

bannia10.pngdacora10.png


#13 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 09 March 2014 - 12:33 PM

Ok lets change the approach a bit :p

 

Make an object in the system.ini

//------------------------------------------------------------------------------
ChildObject RainyIvoryTowerVisionPing IvoryTowerVisionBase
    VisionRange     = MEN_FORTRESS_IVORY_TOWER_VISION_RANGE

    // Gives ally troops bonus
    Behavior = AttributeModifierAuraUpdate ModuleTag_TroopBonus
        StartsActive    = Yes                //If no, requires upgrade to turn on.
        BonusName        = PalantirVision
        RefreshDelay    = 1000
        Range            = 200
        ObjectFilter    = ANY +ORC +URUK +CAVALRY -STRUCTURE -BASE_FOUNDATION -HERO
    End    
End

 

In the experiencelevels.ini you need to make a experiencelevel for the RainyIvoryTowerVisionPing, which gives Upgrade_FarsightRainy.

Give the Object above the Command_SpecialAbilityFarsightRainyUnseen in its commandset.

Add the modules which you added in your hero:

Behavior = DoCommandUpgrade Module_DoCommandUpgrade 
TriggeredBy = Upgrade_FarsightRainy
GetUpgradeCommandButtonName = Command_SpecialAbilityFarsightRainyUnseen
End

Behavior = FreezingRainSpecialPower ModuleTag_FreezingRain
    SpecialPowerTemplate            = SpecialAbilityFarsightRainyUnseen
    AttributeModifierAffects        = ALL ENEMIES
    AntiCategory                = LEADERSHIP
    AttributeModifierWeatherBased        = Yes
    WeatherDuration                = 30000 ; same time that ivory tower power duration. ;)
    ChangeWeather                = RAINY
    AvailableAtStart            = Yes
    BurnRateModifier            = -100
    BurnDecayModifier            = 20
End

 

In your hero you need to change the:

Behavior = OCLSpecialPower ModuleTag_FarsightRainy
    SpecialPowerTemplate = SpecialAbilityFarsightRainy
    StartsPaused     = No
    OCL = SpecialPowerIvoryTowerVision
    CreateLocation = CREATE_AT_LOCATION
End

 

change SpecialPowerIvoryTowerVision to SpecialPowerRainyIvoryTowerVision.

In the Objectcreationlist.ini add a new OCL:

ObjectCreationList SpecialPowerRainyIvoryTowerVision
  CreateObject
    ObjectNames = RainyIvoryTowerVisionPing
    Count = 1
  End
End

 

So your hero will need a button that activates the SpecialAbilityFarsightRainy power :)

Got it? :D


Ridder Geel

#14 ModdingMaster

ModdingMaster
  • Members
  • 17 posts
  • Location:France
  • Projects:Akatsuki's Mod
  •  Modding, Mapping, Codes, APT

Posted 09 March 2014 - 09:44 PM

I'm sorry again, I tried but it still does not work.

 

 

Give the Object above the Command_SpecialAbilityFarsightRainyUnseen in its commandset.

 

I did not understand this, this is a module for commandbutton? Why are you telling me to put in commandset? XD :)

 

 

So your hero will need a button that activates the SpecialAbilityFarsightRainy power

 

There is that too, I think I already created. :)

 

I actually think that if you gave me all the codes as a result it would be better, because there was method code by code and I'm lost LOL. :)

 

Thanks. :)


bannia10.pngdacora10.png


#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 09 March 2014 - 11:25 PM

Well I kinda gave you all the code...

What I said up there, the final object that your power needs to spawn looks like:

//------------------------------------------------------------------------------
ChildObject RainyIvoryTowerVisionPing IvoryTowerVisionBase
    VisionRange     = MEN_FORTRESS_IVORY_TOWER_VISION_RANGE

    // Gives ally troops bonus
    Behavior = AttributeModifierAuraUpdate ModuleTag_TroopBonus
        StartsActive    = Yes                //If no, requires upgrade to turn on.
        BonusName        = PalantirVision
        RefreshDelay    = 1000
        Range            = 200
        ObjectFilter    = ANY +ORC +URUK +CAVALRY -STRUCTURE -BASE_FOUNDATION -HERO
    End
    Behavior = DoCommandUpgrade Module_DoCommandUpgrade 
       TriggeredBy = Upgrade_FarsightRainy
       GetUpgradeCommandButtonName = Command_SpecialAbilityFarsightRainyUnseen
    End

   Behavior = FreezingRainSpecialPower ModuleTag_FreezingRain
    SpecialPowerTemplate            = SpecialAbilityFarsightRainyUnseen
    AttributeModifierAffects        = ALL ENEMIES
    AntiCategory                = LEADERSHIP
    AttributeModifierWeatherBased        = Yes
    WeatherDuration                = 30000 ; same time that ivory tower power duration. ;)
    ChangeWeather                = RAINY
    AvailableAtStart            = Yes
    BurnRateModifier            = -100
    BurnDecayModifier            = 20
   End
End

 

This is in whatever object triggers the power:

Behavior = OCLSpecialPower ModuleTag_FarsightRainy
    SpecialPowerTemplate = SpecialAbilityFarsightRainy
    StartsPaused     = No
    OCL = SpecialPowerIvoryTowerVision
    CreateLocation = CREATE_AT_LOCATION
End

 

And you need to give the object that triggers that power a commandbutton that triggers the SpecialAbilityFarsightRainy.

 

You need to add this in the ObjectCreationList.ini

ObjectCreationList SpecialPowerRainyIvoryTowerVision
  CreateObject
    ObjectNames = RainyIvoryTowerVisionPing
    Count = 1
  End
End

 

In the experiencelevels.ini you need to add this code:

ExperienceLevel    RainyIvoryTowerVisionPingLevel1
    TargetNames                          =    RainyIvoryTowerVisionPing
    RequiredExperience                  =    1
    ExperienceAward                    =    0
    Rank                            =    1
    Upgrades                = Upgrade_FarsightRainy
END  

 

I can be any more straight forward than this, this is simply what needs to be done...


Ridder Geel

#16 ModdingMaster

ModdingMaster
  • Members
  • 17 posts
  • Location:France
  • Projects:Akatsuki's Mod
  •  Modding, Mapping, Codes, APT

Posted 10 March 2014 - 10:48 AM

That's it, I finally managed to get what I wanted, perfect synchronization with the two powers. You'll laugh, I put DoCommandUpgrade in the hero file and not in système.ini :trickydick: . I misplaced as the level of experience in experiencelevels.ini. You are very strong, better than me greatly. :)

 

Thanks a lot Ridder Geel, issue resolved ! :)

 

NB : For two years I tried to get this ! ;)


bannia10.pngdacora10.png


#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 10 March 2014 - 08:32 PM

Ghehe, well no problem, feel free to ask any more questions here :p


Ridder Geel




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users