Jump to content


Photo

Darkness using Cloudbreak code


  • Please log in to reply
16 replies to this topic

#1 Valheru

Valheru

    Ashen Shugar

  • Project Team
  • 765 posts
  • Location:Australia
  • Projects:patching & see

Posted 02 September 2014 - 02:56 AM

Hello,

 

Run into a roadblock with making Darkness use the CloudbreakSpecialPower behaviour. The reason behind this is that its so much easier to produce Global FX, if I make it an OCL power it requires a cast point, making it a bit silly.

 

The funny thing is that this code works for other powers, Ive used it in heroes like Sauron with no issues, it also produces the SunbeamObject fine when I leave the 'SpecialPowerTemplate = SpellBookCloudBreak' intact and just change the sunbeamobject.

 

I do not understand why when I try to replicate this type of behaviour into Darkness, it doesnt work. When I click darkness, nothing happens. With or without having any sciences as prerequisites the same issue arises. I have searched everywhere incase there are other spellbookdarkness behaviours by default, but there are none. 

 

Have also tried renaming the entire powers template, same issue. 

 

Why is this behaviour working for heroes and Cloudbreak(changes in the sunbeam object), but not darkness? :/ The moment I change the template back to SpecialPowerTemplate = SpellBookCloudBreak everything is fine and dandy regardless of the object being fired. 

 

Im thinking something simple is wrong as its working for heroes etc just fine. I have not included the sunbeam object as it works ok on heroes.

 

this is definately the commandset being used by Mordor, the science purchases should not be relevant as no prerequisites have been marked, at least for now, Darkness is available as soon as the game begins.

  	
;;;system;;;

Behavior = CloudBreakSpecialPower ModuleTag_darkness
		SpecialPowerTemplate			= SpellBookDarkness
    	        SunbeamObject			= DarknessWeatherChanger
		ObjectSpacing					= 300
		AttributeModifierAffects	= ANY +INFANTRY +CAVALRY +MONSTER +HERO +HORDE  ALLIES
		ReEnableAntiCategory			= Yes 
		AttributeModifierWeatherBased	= Yes			
		WeatherDuration					= 60000
		ChangeWeather					= CLOUDY ;SUNNY
	End

;;;;cs;;;;
CommandSet MordorSpellBookCommandSet

9 = Command_SpellBookDarkness

;;;;;;;cb ;;;;;;; 

CommandButton Command_SpellBookDarkness
	Command				= SPELL_BOOK
    SpecialPower		= SpellBookDarkness
    ButtonImage			= SBEvil_Darkness
	TextLabel			= CONTROLBAR:Darkness
	DescriptLabel		= CONTROLBAR:TooltipDarkness
	
End

;;;;;;;;;;;;;;;;;;

;------------------------------------------------------------------------------
SpecialPower SpellBookDarkness
	Enum                     = SPECIAL_SPELL_BOOK_CLOUD_BREAK ; SPECIAL_SPELL_BOOK_DARKNESS
	;;RequiredSciences          = SCIENCE_Darkness
	ReloadTime               = 360000 ; ; SPELL_RECHARGE_TIME_TIER_3  ;600000 in milliseconds
	InitiateSound  = SpellDarkness
	Flags					 = RESPECT_RECHARGE_TIME_DISCOUNT
End




Edited by Valheru, 02 September 2014 - 02:59 AM.

SEE_Team_Rigger.jpg


#2 -SilverBane-

-SilverBane-

    Inactive Noob

  • Project Team
  • 474 posts
  • Location:Bucharest
  • Projects:Life
  •  Mapper & Coder

Posted 02 September 2014 - 07:10 AM

So you say that it works when you use SpellBookCloudBreak?

I haven't encountered this problem before, I've had only a somehow similar problem with ChangeWeather = CLOUDYRAINY wich wasn't working :/

 

Can you post the sunbeam object too?

 

It might not work because of the Enum, I've had problems with those in past, try changing the enum back to SPECIAL_SPELL_BOOK_DARKNESS

 

I will test this myself later


2qm3dd5.jpg


#3 Valheru

Valheru

    Ashen Shugar

  • Project Team
  • 765 posts
  • Location:Australia
  • Projects:patching & see

Posted 02 September 2014 - 08:03 AM

Na its not the enum. And yes this code works fine when used on heroes abilities.

SEE_Team_Rigger.jpg


#4 -SilverBane-

-SilverBane-

    Inactive Noob

  • Project Team
  • 474 posts
  • Location:Bucharest
  • Projects:Life
  •  Mapper & Coder

Posted 02 September 2014 - 08:20 AM

Have you tried using this?

	Behavior = OCLSpecialPower ModuleTag_Sunflare
		SpecialPowerTemplate 			= SpellBookSunflare
		OCL                  			= OCL_SpecialPowerSunflare
		CreateLocation       			= CREATE_AT_LOCATION
		AvailableAtStart	 			= No
		AttributeModifierAffects		= ANY +INFANTRY +CAVALRY +MONSTER -HERO ENEMIES
		;ReEnableAntiCategory			= Yes
		AttributeModifierWeatherBased	= Yes			
		WeatherDuration					= 60000 ;SPELL_SUNFLARE_DURATION
		ChangeWeather					= CLOUDY ;SUNNY
		RequirementsFilterMPSkirmish = SPELL_BOOK_REQUIREMENTS_FILTER
		RequirementsFilterStrategic = SPELL_BOOK_REQUIREMENTS_FILTER_STRATEGIC
	End

Edited by -SilverBane-, 02 September 2014 - 08:20 AM.

2qm3dd5.jpg


#5 Valheru

Valheru

    Ashen Shugar

  • Project Team
  • 765 posts
  • Location:Australia
  • Projects:patching & see

Posted 02 September 2014 - 08:27 AM

Read my original post. Yes. Ocl is useless as it requires a cast point. In order to trigger objects/fx would require 2 clicks, dont want that.

SEE_Team_Rigger.jpg


#6 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 02 September 2014 - 09:07 AM

So to get this clear... you are trying to do this, so you are able to use the SunbeamObject?
On Another note, where is this object? DarknessWeatherChanger

Also you have these parameters for darkness:
SpecialPowerTemplate
UpdateModuleStartsAttack
StartsPaused
InitiateSound
ReEnableAntiCategory
AntiCategory
AntiFX
AttributeModifier
AttributeModifierRange
AttributeModifierAffectsSelf
AttributeModifierAffects
AttributeModifierFX
AttributeModifierWeatherBased
WeatherDuration
RequirementsFilterMPSkirmish
RequirementsFilterStrategic
TargetEnemy
TargetAllSides
InitiateFX
TriggerFX
SetModelCondition
SetModelConditionTime
GiveLevels
DisableDuringAnimDuration
IdleWhenStartingPower
AffectGood
AffectEvil
AffectAllies
AvailableAtStart
ChangeWeather
AdjustVictim
OnTriggerRechargeSpecialPower
BurnDecayModifier
UseDistanceFromCommandCenter
DistanceFromCommandCenter
;;And specific to darkness
DarknessRadius
DarknessFX

Do the last two not do what you want?

Edited by Ridder Geel, 02 September 2014 - 09:25 AM.

Ridder Geel

#7 Valheru

Valheru

    Ashen Shugar

  • Project Team
  • 765 posts
  • Location:Australia
  • Projects:patching & see

Posted 02 September 2014 - 09:30 AM

Yeah. For example in a sauron power i made the sunbeamobject is just a no-model with FX followbones that populates the map. Its a mystery why its not working inside Spellbook but works as a SpecialPower/ability on heroes

SEE_Team_Rigger.jpg


#8 Valheru

Valheru

    Ashen Shugar

  • Project Team
  • 765 posts
  • Location:Australia
  • Projects:patching & see

Posted 02 September 2014 - 09:32 AM

Edit-try some of those parameters laterz thx

SEE_Team_Rigger.jpg


#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 02 September 2014 - 09:36 AM

Might be the way spellbook works eh, does the original cloudbreak sunbeams work when its used in the spellbook? :p (wouldn't surprise me if it didn't :D )
Ridder Geel

#10 Valheru

Valheru

    Ashen Shugar

  • Project Team
  • 765 posts
  • Location:Australia
  • Projects:patching & see

Posted 02 September 2014 - 09:41 AM

It works in rotwk tho, and that game is based off bfme2 patch 1.04 and its gamedat. Im curious to know if this code works in ur bfme2 ridd. Ive a vague memory of seeing a mod in bfme1 that also used it successfully inside spellbook

SEE_Team_Rigger.jpg


#11 -SilverBane-

-SilverBane-

    Inactive Noob

  • Project Team
  • 474 posts
  • Location:Bucharest
  • Projects:Life
  •  Mapper & Coder

Posted 02 September 2014 - 10:33 AM

I have tried all those parameters related to FX (and also the ones with radius and distance). None works ( i've been using a green sunflare FX to make it easy to be found if its created). Ridder Geel could I have also the OCLSpecialPower parameters if you have time/ don't mind?

 

 

Edit: I've tried in many other ways, even like this:

Adding the FX into the model of the darknessweatherchanger, and then it should spawn on gollum spawn points. It should, but it doesn't.

ObjectCreationList OCL_DarknessWeatherChanger
    CreateObject
        ObjectNames = DarknessWeatherChanger
        Count = 1
        IgnoreAllObjects            = Yes
        WaypointSpawnPoints        = SpawnPoint_SkirmishGollum_
    End
End

 

It would be a way probably, through map scripts ( in this case with AI_SpellExecution or sth), spawn an object wich haves the fx u want on waypoints... but you would need to add waypoints all over the maps, wich is a lot of work. Then you add in the weatherKiller weapon an objectFilter for this new object wich haves the FX you want
 

 

Thats just an idea, for one map only the last idea would work well, however to do that for all maps is too much work in my oppinion


Edited by -SilverBane-, 02 September 2014 - 11:49 AM.

2qm3dd5.jpg


#12 Valheru

Valheru

    Ashen Shugar

  • Project Team
  • 765 posts
  • Location:Australia
  • Projects:patching & see

Posted 02 September 2014 - 12:09 PM

bleh, ive a feeling its a shitty bug somewhere in my ini, not even the original darkness code works now


SEE_Team_Rigger.jpg


#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 02 September 2014 - 12:11 PM

Interesting idea... :p But yea that is a lot of work... So is this list thing you asked for, but alas... I'm a good lad so...
Behavior = OCLSpecialPower ModuleTag_TheOCLSpecialPower
	;SUB_L011FA190->L01F42520:
	SpecialPowerTemplate = ;L00E6C5F0:SpecialPower
	UpdateModuleStartsAttack = ;SUB_L006D3400:Boolean
	StartsPaused = ;SUB_L006D3400:Boolean
	InitiateSound = ;L00E6B7B0 //voice?
	ReEnableAntiCategory = ;SUB_L006D3400:Boolean
	AntiCategory = ;L01212430:AttributeModifierCategory //Multiple Entries Allowed (http://code.the3rdage.net/wiki/ModifierList)
	AntiFX = ;SUB_L00E6BD90:FXList
	AttributeModifier = ;SUB_L006D4C30:String (AttributeModifier)
	AttributeModifierRange = ;SUB_L006D46C0:Float Point Value
	AttributeModifierAffectsSelf = ;SUB_L006D3400:Boolean
	AttributeModifierAffects = ;SUB_L00EDCA00:Object Filter
	AttributeModifierFX = ;SUB_L00E6BD90:FXList
	AttributeModifierWeatherBased = ;SUB_L006D3400:Boolean
	WeatherDuration = ;SUB_L00E6CB10:Unsigned Integer Value
	RequirementsFilterMPSkirmish = ;SUB_L00EDCA00:Object Filter
	RequirementsFilterStrategic = ;SUB_L00EDCA00:Object Filter
	TargetEnemy = ;SUB_L006D3400:Boolean
	TargetAllSides = ;SUB_L006D3400:Boolean
	InitiateFX = ;SUB_L00E6BD90:FXList
	TriggerFX = ;SUB_L00E6BD90:FXList
	SetModelCondition = ;L011FA050 //Model Condition
	SetModelConditionTime = ;SUB_L006D46C0:Float Point Value
	GiveLevels = ;SUB_L006D4430:Signed Integer Value
	DisableDuringAnimDuration = ;SUB_L006D3400:Boolean
	IdleWhenStartingPower = ;SUB_L006D3400:Boolean
	AffectGood = ;SUB_L006D3400:Boolean
	AffectEvil = ;SUB_L006D3400:Boolean
	AffectAllies = ;SUB_L006D3400:Boolean
	AvailableAtStart = ;SUB_L006D3400:Boolean
	ChangeWeather = ;L011FA120 //Weather Type
	AdjustVictim = ;SUB_L006D3400:Boolean
	OnTriggerRechargeSpecialPower = ;SUB_L006D4C30:String (SpecialPower)
	BurnDecayModifier = ;SUB_L006D4520:Unsigned Integer Value
	UseDistanceFromCommandCenter = ;SUB_L006D3400:Boolean
	DistanceFromCommandCenter = ;SUB_L006D46C0:Float Point Value

	;L01F5BE68:
	UpgradeOCL = ;L01272FF0
	OCL = ;SUB_L00E6C330:ObjectCreationList
	CreateLocation = ;SUB_L006D3B30 ;L0223D398
	UpgradeName = ;L01273050
	NearestSecondaryObjectFilter = ;SUB_L00EDCA00:Object Filter
End
Good luck with that :p

Well fix that first then valheru :p

Edited by Ridder Geel, 02 September 2014 - 12:11 PM.

Ridder Geel

#14 -SilverBane-

-SilverBane-

    Inactive Noob

  • Project Team
  • 474 posts
  • Location:Bucharest
  • Projects:Life
  •  Mapper & Coder

Posted 03 September 2014 - 08:39 AM

Thanks Ridder!


2qm3dd5.jpg


#15 Valheru

Valheru

    Ashen Shugar

  • Project Team
  • 765 posts
  • Location:Australia
  • Projects:patching & see

Posted 03 September 2014 - 12:15 PM

This has been resolved, my code was fine, unknown reason why it didnt work in spellbook, restored my old ini's, applied this code and bingo. Darkness now looks amazing ;)


SEE_Team_Rigger.jpg


#16 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 04 September 2014 - 08:55 AM

Well awesome to hear its working now :D
I hate it when those odd glitches occur... guess that's kinda the risk you take when modding...
Ridder Geel

#17 Valheru

Valheru

    Ashen Shugar

  • Project Team
  • 765 posts
  • Location:Australia
  • Projects:patching & see

Posted 06 September 2014 - 09:51 AM

if anyone wants a copy and textures for any of my shit in my channel just ask, here is darkness-watch in 1080p

 


Edited by Valheru, 06 September 2014 - 09:56 AM.

SEE_Team_Rigger.jpg





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users