Jump to content


Photo

Passive Dwarven Riches

dwarvenriches

Best Answer Miraak5, 20 June 2019 - 10:07 AM

In 2.02 we fixed fuel the fire bug (in the original game if you loose the fortress fuel the fire bonus was still enabled) so the code is a bit diffrent (and same for dwarven riches here)

you are missing this code

	Behavior = AttributeModifierAuraUpdate ModuleTag_AllowDwarvenRiches ;;,;; First added in 2.02e
		StartsActive	= No ;If no, requires upgrade to turn on.
		BonusName		= SpellBookDwarvenRiches
		TriggeredBy		= Upgrade_GrantDwarvenRiches
		RefreshDelay	= 2000
		Range			= 999999
		TargetEnemy		= No ;
		ObjectFilter	= ANY +DwarvenMineShaft +DwarvenMineShaftForUndermine
	End 

(you need to put it in the DwarvenFortressCitadel) (you can also add SAME_PLAYER in the object filter if you don't want it to affect dwarven allies)

 

but anyway for V8 we brought it back as a castable power

Go to the full post


  • Please log in to reply
5 replies to this topic

#1 OneV

OneV
  • Members
  • 53 posts

Posted 20 June 2019 - 02:56 AM

Hey Guys,

I've been trying to make "Dwarven Riches" a passive spell like "Fuel The Fires" but it has not worked. I even tried to copy 2.02, but it did not work either. I've made the following changes. Am I missing something? 

 

specialpower.ini

 

;;,;; 2.01 Riches removed

;SpecialPower SpellBookDwarvenRiches
; Enum = SPECIAL_SPELL_BOOK_DWARVEN_RICHES
; ReloadTime = SPELL_RECHARGE_TIME_TIER_2
; RadiusCursorRadius = DWARVENRICHES_EFFECT_RADIUS
; RequiredSciences = SCIENCE_DwarvenRiches
; InitiateAtLocationSound = SpellDwarvenRiches1
; Flags = RESPECT_RECHARGE_TIME_DISCOUNT NEEDS_OBJECT_FILTER 
; ObjectFilter = INDUSTRY_TYPE_SPELL_OBJECT_FILTER
;End
;;,;;
;------------------------------------------------------------------------------
SpecialPower SpellBookPassiveDwarvenRiches ;;,;; added for 2.02e
Enum = SPECIAL_SPELL_BOOK_FUEL_THE_FIRES
ReloadTime = 0
RequiredSciences = SCIENCE_DwarvenRiches
InitiateSound = SpellDwarvenRiches1
Flags = RESPECT_RECHARGE_TIME_DISCOUNT
End

system.ini

 

 

;;,;; original 2.01 Dwarven Riches, removed for 2.02e

;    Behavior = SpecialPowerModule ModuleTag_DwarvenRiches
;        SpecialPowerTemplate        = SpellBookDwarvenRiches        
;        AttributeModifier            = SpellBookDwarvenRiches
;        AttributeModifierRange        = DWARVENRICHES_EFFECT_RADIUS
;        AttributeModifierAffects    = INDUSTRY_TYPE_SPELL_OBJECT_FILTER
;        TriggerFX                    = FX_DwarvenRiches
;        UpdateModuleStartsAttack    = No
;        AvailableAtStart            = No
;        RequirementsFilterMPSkirmish = SPELL_BOOK_REQUIREMENTS_FILTER
;        RequirementsFilterStrategic = SPELL_BOOK_REQUIREMENTS_FILTER_STRATEGIC
;    End
;;,;;
 
   Behavior = PlayerUpgradeSpecialPower    ModuleTag_PassiveDwarvenRiches    ;;,;; added for 2.02e
        SpecialPowerTemplate        = SpellBookPassiveDwarvenRiches
        UpgradeName             = Upgrade_GrantDwarvenRiches
        UpdateModuleStartsAttack    = No
        AffectAllies            = No
        AvailableAtStart        = No
        RequirementsFilterMPSkirmish     = SPELL_BOOK_REQUIREMENTS_FILTER
        RequirementsFilterStrategic     = SPELL_BOOK_REQUIREMENTS_FILTER_STRATEGIC
    End
commandbutton.ini

 

CommandButton Command_SpellBookDwarvenRiches

    Command                = SPELL_BOOK
    SpecialPower        = SpellBookPassiveDwarvenRiches; SpellBookDwarvenRiches    
    ButtonImage            = SBGood_DwarvenRiches
    Options                = NONPRESSABLE
    TextLabel            = CONTROLBAR:DwarvenRiches
    ButtonBorderType    = ACTION
    DescriptLabel        = CONTROLBAR:TooltipDwarvenRiches
End

 

CommandButton Command_PurchaseSpellDwarvenRiches

    Command                = PURCHASE_SCIENCE
    ButtonBorderType    = UPGRADE 
    ButtonImage            = SBGood_DwarvenRiches
    Science                = SCIENCE_DwarvenRiches
    TextLabel            = CONTROLBAR:DwarvenRiches
    DescriptLabel        = CONTROLBAR:TooltipDwarvenRiches
    CommandTrigger        = Command_SpellBookDwarvenRiches ;;,;; added for 2.02e
End

 

upgrade.ini

 

Upgrade Upgrade_GrantDwarvenRiches ;;,;; added for 2.02e

Type = PLAYER
End
 

 

dwarvenmineshaft.ini

 

        AnimationState = USER_5 ;;,;; Added for 2.02e (T.C.) - Dwarven Riches particle system

            ParticleSysBone    = None DwarvenRichesEmbers
        End
        AnimationState = USER_5 UPGRADE_ECONOMY_BONUS ;;,;; Added for 2.02e (T.C.) - Industry has priority.
            ParticleSysBone    = None FueltheFiresEmbers
        End
    End

 



#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 20 June 2019 - 09:49 AM

Where do you make the object (dwarvenmineshaft) change to user 5 if they have the upgrade you are giving globally?
Ridder Geel

#3 Miraak5

Miraak5

    title available

  • Members
  • 389 posts
  • Location:France
  • Projects:ROTWK Patch 2.02, Wars of the North, BFME1 1.08 Complete Edition
  •  BIG coding, Map scripting and AI coding

Posted 20 June 2019 - 10:07 AM   Best Answer

In 2.02 we fixed fuel the fire bug (in the original game if you loose the fortress fuel the fire bonus was still enabled) so the code is a bit diffrent (and same for dwarven riches here)

you are missing this code

	Behavior = AttributeModifierAuraUpdate ModuleTag_AllowDwarvenRiches ;;,;; First added in 2.02e
		StartsActive	= No ;If no, requires upgrade to turn on.
		BonusName		= SpellBookDwarvenRiches
		TriggeredBy		= Upgrade_GrantDwarvenRiches
		RefreshDelay	= 2000
		Range			= 999999
		TargetEnemy		= No ;
		ObjectFilter	= ANY +DwarvenMineShaft +DwarvenMineShaftForUndermine
	End 

(you need to put it in the DwarvenFortressCitadel) (you can also add SAME_PLAYER in the object filter if you don't want it to affect dwarven allies)

 

but anyway for V8 we brought it back as a castable power


Edited by Miraak5, 20 June 2019 - 10:07 AM.

He was the first...


#4 OneV

OneV
  • Members
  • 53 posts

Posted 20 June 2019 - 03:14 PM

First of all, thank you for your responses.

 

Where do you make the object (dwarvenmineshaft) change to user 5 if they have the upgrade you are giving globally?

Good point, I guess I did not do it. I just removed those lines and kept it the way it was. It did not change anything though.

 

        AnimationState = UPGRADE_ECONOMY_BONUS

            ParticleSysBone    = None FueltheFiresEmbers
      
        End

 

Miraak5, That definitely was part of the problem. I tried adding that bit of code to system.ini, but it did not change anything in the game. Also tried adding it as an .inc file the way it is done in 2.02 and it still not working. I can't figure out as to why. You mean put it in dwarvenfortress.ini under Object DwarvenFortressCitadel?

In 2.02 we fixed fuel the fire bug (in the original game if you loose the fortress fuel the fire bonus was still enabled) so the code is a bit diffrent (and same for dwarven riches here)

you are missing this code

	Behavior = AttributeModifierAuraUpdate ModuleTag_AllowDwarvenRiches ;;,;; First added in 2.02e
		StartsActive	= No ;If no, requires upgrade to turn on.
		BonusName		= SpellBookDwarvenRiches
		TriggeredBy		= Upgrade_GrantDwarvenRiches
		RefreshDelay	= 2000
		Range			= 999999
		TargetEnemy		= No ;
		ObjectFilter	= ANY +DwarvenMineShaft +DwarvenMineShaftForUndermine
	End 

(you need to put it in the DwarvenFortressCitadel) (you can also add SAME_PLAYER in the object filter if you don't want it to affect dwarven allies)

 

but anyway for V8 we brought it back as a castable power


Edited by OneV, 21 June 2019 - 03:41 AM.


#5 Miraak5

Miraak5

    title available

  • Members
  • 389 posts
  • Location:France
  • Projects:ROTWK Patch 2.02, Wars of the North, BFME1 1.08 Complete Edition
  •  BIG coding, Map scripting and AI coding

Posted 21 June 2019 - 10:28 AM

 

 

You mean put it in dwarvenfortress.ini under Object DwarvenFortressCitadel?

yes exactly, 2.02 .inc file is liked in that object, but directly putting the code inside will be faster for you


He was the first...


#6 OneV

OneV
  • Members
  • 53 posts

Posted 21 June 2019 - 04:57 PM

 

 

 

You mean put it in dwarvenfortress.ini under Object DwarvenFortressCitadel?

yes exactly, 2.02 .inc file is liked in that object, but directly putting the code inside will be faster for you

 

That has solved the problem. Thank you for your help, I appreciate it.


Edited by OneV, 21 June 2019 - 04:57 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users