making buyable items ?
#1
Posted 01 September 2008 - 12:12 PM
1-is there a trick i can make so that i make heros can buy items to improve them.
2-if buying items is possible , then can i make them drop or pick the items again.
3-if possible , can i make these items appear in the hero inventory .
4-i have tried to make the player change the heros powers while he is in game , i made a trigger with a map to give the hero a new power if he stand on it , it worked nice , but the problem is i must give all heros the behaviors and modules in his .inis and thats a really hard work , is there a workaround .
i know a lot of modding and modeling but a little map making so all i want is the idea on how to make , if there is something i don't understand then i will ask about it then.
thx for any help i get
#2
Posted 01 September 2008 - 01:46 PM
2) Dropping items seems like being highly impossible... *
3) Inventory seems (to me) impossible... *
4) Yes all the heros would need the behavior modules, but a suggestion would be is to make a .INC file and refer to it in all the hero's code, that way you can add or remove some 'powers' without having to change it on all the heros!
* if its possible i would love to know how to make that work too
#3
Posted 01 September 2008 - 07:28 PM
btw thx for the idea of .inc it will help alot.
i will post here as soon i get more results.
bye
#4
Posted 01 September 2008 - 07:33 PM
#5
Posted 03 September 2008 - 01:10 AM
Grim's mods might be a lead, he did alot of crazy stuff. Check out his BFME I mod especially.
If you don't want to, I can give you a few pointers:
1: Check out code relating to the one ring in the Ring Heroes INIs.
2: Check out the code relating to the one ring in the fortress INIs.
3: Specifically, in those files look for the part where it REMOVES the upgrades.
#6
Posted 03 September 2008 - 01:57 PM
;------------------------------------ Ring ------------------------------------------------ Object TheDroppedRing Draw = W3DScriptedModelDraw ModuleTag_01 DefaultModelConditionState Model = TheRing ParticleSysBone NONE OneRing ;ParticleSysBone NONE OneRingAura Shadow = SHADOW_ADDITIVE_DECAL ShadowSizeX = 200 ShadowSizeY = 200 ShadowTexture = MUCatapultFP02 ShadowMaxHeight = 200 ShadowOverrideLODVisibility = yes End IdleAnimationState Animation AnimationName = THERING.THERING AnimationMode = LOOP End End End EditorSorting = MISC_MAN_MADE DisplayName = OBJECT:TheOneRing Side = Civilian KindOf = SELECTABLE IMMOBILE NOT_AUTOACQUIRABLE UNATTACKABLE REVEAL_TO_ALL CRATE ONE_RING ; Only Salvage crates are marked Selectable so the Mouse can interact with them and give Salvage voices. Being dead makes them not actually selectable ThreatLevel = 0.0 ShroudClearingRange = 100 Body = HighlanderBody ModuleTag_Body;Can take damage, but won't die. Can only die from ::kill() or other unresistable damage MaxHealth = 1.0 End ; *** AUDIO Parameters ***; EvaEnemyObjectSightedEvent = DiscoveredRing ; This is so that we get the DiscoveredRing event if it is unstealthed when we first see it ClientUpdate = EvaAnnounceClientCreate ModuleTag_AnnounceCreate ; And this covers the case where the Ring spawns in while in sight of the player's troops AnnouncementEventEnemy = DiscoveredRing AnnouncementEventAlly = DiscoveredRing AnnouncementEventOwner = DiscoveredRing OnlyIfVisible = Yes ; Don't announce if hidden in the shroud UseObjectsPosition = Yes ; Play from the Ring's position CreateFakeRadarEvent = Yes ; Allow player to jump to the Ring after hearing annoucement DelayBeforeAnnouncementMS = 1000 ; Allow 1 second before announcing. This is mostly so that if someone is right on top of the ring, we can use the pickup event to block the discovered event ; and not get two announcements ; CountAsFirstSightedAnnoucement = Yes; Doesn't matter since this unit doesn't use EvaOnFirstSightingEventEnemy/NonEnemy End ClientUpdate = RadarMarkerClientUpdate ModuleTag_RadarMarker MarkerType = PingOneRing End ;--------------------------- Behavior = AttachUpdate ModuleTag_Attach ObjectFilter = ANY +INFANTRY +CAVALRY +HERO +MONSTER +MACHINE -WORKING_PASSENGER -NO_COLLIDE -INERT -IGNORED_IN_GUI -PROJECTILE -NEUTRALGOLLUM -NOT_AUTOACQUIRABLE -WildSpiderling_Slaved -IsengardExplosiveMine -Wyrm -WargSentry NOT_FLYING_UNITS ScanRange = 10 ParentStatus = HOLDING_THE_RING AlwaysTeleport = No AnchorToTopOfGeometry = Yes // Eva events to play when the Ring is picked up by the local player / an ally / an enemy ParentOwnerAttachmentEvaEvent = RingPickedUpLocal ;ParentAllyAttachmentEvaEvent = Nothing for now! (Are we sure???) ParentEnemyAttachmentEvaEvent = RingPickedUpEnemy ParentOwnerDiedEvaEvent = LocalPlayerLosesRing; E.g. the unit carrying the ring died, so we lost it. ;ParentAllyDiedEvaEvent = Nothing (for now) ;ParentEnemyDiedEvaEvent = Nothing (for now) End ; Remove the ring hero upgrade from which ever player created us. This is to remove the ability to build ; the ring heroes when out fortress holding the ring has been nuked. Behavior = RemoveUpgradeUpgrade ModuleTag_RemoveRingFromPlayer TriggeredBy = Upgrade_IsengardFaction Upgrade_MordorFaction Upgrade_WildFaction Upgrade_MenFaction Upgrade_ElfFaction Upgrade_DwarfFaction UpgradeToRemove = Upgrade_RingHero SuppressEvaEventForRemoval = Yes End Behavior = DestroyDie ModuleTag_Die End Behavior = CreateObjectDie ModuleTag_DropTheRing CreationList = OCL_TheOneRing End Geometry = CYLINDER GeometryMajorRadius = 10.0 GeometryHeight = 10.0 GeometryIsSmall = Yes //Shadow = SHADOW_VOLUME Shadow = SHADOW_DECAL End
Looks like its not too difficult to make after all
You might want to concider looking at the 'money' chests, they might help a bit too
The fortresses all use this code for the one ring:
; Must come BEFORE the CreateObjectDie; when the CreateObjectDie processes the death, ; it will remove our ring upgrade which will remove the ONE_RING model condition which will ; confuse the FXList into thinking this was not the fortress with the one ring... Behavior = FXListDie ModuleTag_AnnounceWeLostTheRing DeathFX = AnnounceFortressDeathLostRingFX ; FXList checks for ONE_RING model condition internally End ; Spawn a dropped ring object if we have the ring hero upgrade Behavior = CreateObjectDie ModuleTag_DropTheRing CreationList = OCL_TheOneRing ; Needs both the player and object versions to create a ring when destroyed. UpgradeRequired = Upgrade_RingHero Upgrade_FortressRingHero End Behavior = ModelConditionUpgrade ModuleTag_ForFX TriggeredBy = Upgrade_RingHero Upgrade_FortressRingHero RequiresAllTriggers = Yes AddConditionFlags = ONE_RING End ; Special draw module just for rendering the ring model over the fortress to indicate ownership. Draw = W3DScriptedModelDraw ModuleTag_RingFX DefaultModelConditionState Model = None End ; Higher version for tall towers. ModelConditionState = ONE_RING BUILD_VARIATION_TWO Model = EXOneRing_CR End ModelConditionState = ONE_RING Model = EXOneRing End End
As you can see the upgrade for the ring above the fortress needs 2 upgrades, these are removed when a ring hero is made:
; Player no longer has the ring hero upgrade when the hero is created. Behavior = RemoveUpgradeUpgrade ModuleTag_RemoveRing TriggeredBy = Upgrade_WildFaction Upgrade_IsengardFaction Upgrade_MordorFaction Upgrade_GoblinFaction UpgradeToRemove = Upgrade_RingHero Upgrade_FortressRingHero RemoveFromAllPlayerObjects = Yes SuppressEvaEventForRemoval = Yes; Hack -- this is to avoid the Eva event about 'Gollum stole our ring' ; when we are actually losing the upgrade because we built the ring hero End ; Spawn a dropped ring object. Behavior = CreateObjectDie ModuleTag_DropTheRing CreationList = OCL_TheOneRing End
This should save you some time searching
#7
Posted 04 September 2008 - 12:08 PM
i will post back after i get new results
thanks again
#8
Posted 17 March 2009 - 12:47 AM
I know this is an OLD post...way Before i joined ...thanks for all help
i will post back after i get new results
thanks again
I was Thinking if this idea .. To use a Sword model - found in worldbuider civilian objects
Then Allow it to be picked up by only a hero or certain heroes i.e ones with a sword
That allows for an inceased attack or something special
It picks up and is destroyed like a crate OR hovers over their heads to show who has it .
When they die they just drop it ..
ANY IDEAS ....
#9
Posted 17 March 2009 - 07:28 AM
When we manage to get our system to make that work we will post it here for you if you wish
#10
Posted 17 March 2009 - 05:04 PM
I´m thinking of adding such things too, the question is just, is it possible to assign it to a bone rather than having it flying on top of the head
#11
Posted 17 March 2009 - 05:21 PM
Draw = W3DScriptedModelDraw weapon_item DefaultModelConditionState Model = Model.... End AttachToBoneInAnotherModule = Bone... End
This may work, it may also not work
#12
Posted 17 March 2009 - 05:32 PM
For a full item system it would be cool to have a CommandButton "Inventory" that changes the CommandSet to a transport-like interface. That is, the unit itself is a transport and the items are held inside like a unit would be inside a boat, using "inventory slots". How cool is that.
If you'll allow me I'll add another question. Would this work?
Behavior = RemoveUpgradeUpgrade ModuleTag_CoolItemRemove TriggeredBy = Upgrade_ItemRemover UpgradeToRemove = Upgrade_MyCoolItem Upgrade_ItemRemover End
This way I, in theory, could remove my "cool item" upgrade anytime by giving Upgrade_ItemRemover (and it could be done several times as well).
Do you guys think this would work?
Ps: I'm working on an RPG-styled CaH map where the inventory is displayed as Player Powers after they're bought from a shop. I can't change the commandsets of CaHs so that's the only way to go :S
Anyone up to make an RPG mod?
#13
Posted 17 March 2009 - 05:57 PM
#14
Posted 17 March 2009 - 07:00 PM
Behavior = SalvageCrateCollide ModuleTag_02 ForbiddenKindOf = PROJECTILE ENVIRONMENT IGNORED_IN_GUI ; PickupScience = SCIENCE_GLA ; Only GLA players can pick this up ExecuteFX = FX_GoldChestPickup BannerChance = 10% LevelUpChance = 100% LevelUpRadius = 100.0 ResourceChance = 20% MinResource = 25 MaxResource = 75 AllowAIPickup = No End
And I don't think you can give an upgrade with a death module. Only way would be scripting.
Edited by Crusard, 17 March 2009 - 07:07 PM.
#15
Posted 17 March 2009 - 07:28 PM
The problem isn't removing the upgrade (either on death or button upgrade; it doesn't matter), the problem is making it so PICKING UP the crate ADDS an upgrade. Crates weren't designed to do that, and as of right now only one person has been able to successfully do it... And I can't crack his code.
Who has done this? gimme the code and ill have a go
#16
Posted 17 March 2009 - 10:59 PM
#17
Posted 17 March 2009 - 11:56 PM
This is the route i will look at..
1...try to add this condition to a hero who picks it up
Behavior = ModelConditionUpgrade ModuleTag_ForFX
TriggeredBy = Upgrade_RingHero Upgrade_FortressRingHero
RequiresAllTriggers = Yes
AddConditionFlags = ONE_RING
End
2... then an FX or something ...
; Special draw module just for rendering the ring model over the fortress to indicate ownership.
ModelConditionState = ONE_RING
Model = EXOneRing
End
then a weaponset change in the hero file
WeaponSet
Conditions = ONE_RING
Weapon = PRIMARY GondorAragornHeroSword_SUPER
End
I see this in the upgrade file but I want to know how the upgrade is granted to that specific player ...
; This is the upgrade that get applied to the player that holds the ring.
Upgrade Upgrade_RingHero
Also is it possible to create a NEW Conditions = ONE_SWORD ?? how
4.. what is this code about ...found in crate file
; UpgradedBoost = UpgradeType:Upgrade_AmericaSupplyLines Boost:25
Edited by JUS_SAURON, 17 March 2009 - 11:59 PM.
#19
Posted 18 March 2009 - 02:57 PM
#20
Posted 04 April 2009 - 07:40 PM
Behavior = InheritUpgradeCreate ModuleTag_InheritStonework Radius = DWARVEN_FORTRESS_WALL_EFFECTIVE_RADIUS Upgrade = Upgrade_DwarvenFortressDwarvenStonework ObjectFilter = ANY +DwarvenFortressCitadel End
If we add a similar code to a hero, then "picking up" an item (getting inside the inheritance radius) would trigger an upgrade
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users