HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - cloudnine

Pages: [1] 2
1
Scripting & Programming / RequestSpecByKey (Client)
« on: Dec 11, 13, 12:05:14 PM »
When trying to read a spec on the client using RequestSpecByKey
my subject ends up being the specoracle and the data is an eventobject

not as this post shows data should be the spec and so should the subject?
https://community.heroengine.com/forums/index.php/topic,4279.msg23850.html#msg23850

I have
A method in Combatant Class with me being the E_PlayerCharacter
which is called when a replication field on the E_PlayerCharacter is updated
Code: [Select]
oracle as NodeRef of Class CombatEffectSpecOracle = $SPECORACLEUTILS.GetCombatEffectSpecOracle()
      println("requesting spec !!!!!!!!!!Oracle and key" +oracle + dd.SpecKey +"And the ME Node is" +me)
      //Two types of listeners
      //var listener = oracle.CreateScriptListener( SYSTEM.EXEC.THISSCRIPT, false )
      var listener = oracle.CreateNodeListener( me, false )
      oracle.addListener( listener )
      oracle.RequestSpecByKey(dd.SpecKey, listener)
In the Combatant Class I have these
Code: [Select]
shared function EventRaisedNotify(obsSubject as NodeRef of Class ObsSubject, listener as NodeRef of Class ObsListener, data as NodeRef )
  println("Combatant Event Raised Notify!!!!!!!!Subject:" +obsSubject +"Listener:" +listener +"Data:" +data)
 
obsSubject.removeListener( listener )
 
.

method isListenerInterested( data as NodeRef ) as Boolean
// Supports the idea that listeners may have specific interests
//
println("          Is the listener interested           !!!!!!!!!!!!!!!!!!!!!!!!!!!!")
  return true
.
method destroyListener()
 
.
method EventRaised( obs as NodeRef of Class ObsSubject, data as NodeRef )
  println("Event raised in Combatant class!!!ObsSubjectis:" +obs +"Data:" +data +"The ME Node is" +me)
datastring as String = data
 // Same as client CLI command 
//SendPersistedClientCLI( "qn " +data )
 
where obs is kindof CombatEffectSpecOracle
  println("Subject is a     CombatEffectSpecOracle     !")
  myfakeoracle as NodeRef of Class CombatEffectSpecOracle = $SPECORACLEUTILS.GetCombatEffectSpecOracle()
  var mydata = myfakeoracle.GetSpecByKey(1)
  //mydata as NodeRef of Class CombatEffectSpecOracle = myoracle.GetSpecByKey(1)
  println("My Data:" +mydata)
  println("My Fake Oracle   " +myfakeoracle)
  myfakespec as NodeRef = GetProtoType("CombatEffectSpecOracle")
  myfakespec = myfakeoracle.GetSpecByKey(1)
  println("My Fake Spec:" +myfakespec)
 
  worldAnchor as NodeRef of Class world_anchor = SYSTEM.INFO.WORLDANCHOR
  oracle as NodeRef of Class SpecOracle = worldAnchor.GetCombatEffectSpecOracle()
  fake2 as NodeRef of Class CombatEffectSpec= oracle.GetSpecByKey(1)
  println("Fake Spec 2   " +fake2 +"World Oracle" +oracle)
.

where obs is kindof CombatEffectSpec
  println("Subject is a     CombatEffectSpec     !")
.
where data is kindof  eventObject
  println("DATA is a  EVENTOBJECT   CombatEffectSpecOracle     !")
  if not (data is kindof CombatEffectSpec)
    GlomClass("CombatEffectSpec",data)
    println("Glommed a CombatEffectSpec Class onto DATA")
  .
.
And the Console Shows
Code: [Select]
11:42:26: SCRIPT:[CombatantClassMethods]:requesting spec !!!!!!!!!!Oracle and key10000051461And the me Node is9223372065196132748
11:42:26: SCRIPT:[CombatantClassMethods]:Event raised in Combatant Class!!!ObsSubjectis:1000005146Data:1000005150The me Node is9223372065196132748
11:42:26: SCRIPT:[CombatantClassMethods]:Subject is a     CombatEffectSpecOracle     !
11:42:26: SCRIPT:[CombatantClassMethods]:My Data:0
11:42:26: SCRIPT:[CombatantClassMethods]:My Fake Oracle   1000005151
11:42:26: SCRIPT:[CombatantClassMethods]:My Fake Spec:0
11:42:26: SCRIPT:[CombatantClassMethods]:Fake Spec 2   0World Oracle1000005154
11:42:26: SCRIPT:[CombatantClassMethods]:DATA is a  EVENTOBJECT   CombatEffectSpecOracle     !
11:42:26: SCRIPT:[CombatantClassMethods]:Glommed a CombatEffectSpec Class onto DATA
11:42:26: SCRIPT:[CombatantClassMethods]:The Data is a COMBATEFFECTSPEC           
11:42:26: SCRIPT:[CombatantClassMethods]:Combatant Event Raised Notify!!!!!!!!Subject:1000005146Listener:1000005147Data:1000005150
11:43:25: SCRIPT:[CombatantClassMethods]:COMBATANT REPLICATION FIELDUPDATED DisplayTracker!!!
11:43:25: SCRIPT:[CombatantClassMethods]:DiffForCombatEffects!!!!!
11:43:25: SCRIPT:[CombatantClassMethods]:found effectID:340
11:43:25: SCRIPT:[CombatantClassMethods]:total effect: 1
Any ideas?

2
Developer Job Board / please delete
« on: Feb 21, 13, 05:22:07 PM »
delete

3
Scripting & Programming / [Resolved] Spec Decorator Fields
« on: Feb 19, 13, 05:15:54 PM »
I have an ItemSpec With a HoldableSpecDecorator which has fields
istwohanded       - bool
heldatslot            - enum holdatslots
soloweapontype - enum soloweapontypes
wdam                  - integer
wdelay                - timeinterval
For editing the spec I use a class that inhherits from _GuiNodePropertyEditor
it builds a gui for each decorator, when I save it I use OnGUINodePropertyEditorSubmit
which saves the fields to the spec
I can requestspecbykey on the server then \sn and it all looks good.

Now after the item is instantiated and in the players inventory and equipped,
I want to use the field info for damage calculations.
I check the players inventory and equip slot for the item
Code: [Select]
var inv = actor.GetMyInventory()
        meleew as NodeRef of Class SpecDerivedObject = inv.GetEquipSlotContents("Melee")
        where meleew is kindof Holdable
          println("MELEEWEAPON IS:"+meleew)
        println("MeleeWeaponDamage:"+meleew.wDam+"Delay"+meleew.wDelay+"Type"+meleew.SoloWeaponType)
I can \sn for meleew and it's the wepon, but the damage delay and weapontype are all 0
Where would I make sure the wepon fields are the same as the spec.

I tried adding in the Holdable spec decorator
Code: [Select]
shared function OnInstantiationFromSpec( specDerivedObject as NodeRef )
  if not ( specDerivedObject is kindof Holdable )
    GlomClass( "Holdable", specDerivedObject )
  .
.

method IsItemTwoHanded() as Boolean
// Twohanded held items merely indicate that both hands are occupied
//   any special animation needs are of course handled by the behaves that are sent.
//
  return me.isTwoHanded
.

shared function OnMarshalClassSpecifiedFields( n as NodeRef, marshalString references String )
// Called by the MarshalNodeWithClassSpecifiedFields and MarshalPrototypeWithClassSpecifiedFields in the classMethods
//   scripts for the node n.  Your class method script should use marshalNode/PrototypeAppendField to add the specific
//   fields you want.
//
  MarshalAppendField( marshalString, n, "isTwoHanded" )
  MarshalAppendField( marshalString, n, "HoldAtSlot" )
  MarshalAppendField( marshalString, n, "SoloWeaponType" )
  MarshalAppendField( marshalString, n, "wdam" )
  MarshalAppendField( marshalString, n, "wdelay" )
.
I have getter methods on the client HoldableSpecDecorator
getweapontype, setweapontype. Do these need to be on the server also?
Both Holdable and HoldableSpecDecorator have the same fields.


Once I finish this then add the combo chains and exp chains the combat system will be complete

4
Scripting & Programming / [Resolved] Change Area
« on: Feb 15, 13, 12:19:07 PM »
Hey all,
I have a trigger that sends the character to another area
which works fine.
I set up an arrival path in the area the character is going to
and they arrive there fine.

Then I want to exit the new area and head back to the original area,
which also has an arrival path.
But I want the char to end up by the trigger not the arrival path.

Is there a way to ChangeAreaRequest and specify a path other than the arrival path?
Right now I use for the trigger script
Code: [Select]
function Travel_To_Test3_TriggerEnter( traveler as NodeRef )
  println( "Entered trigger..." )
  where traveler is kindof E_playerCharacter
    account as NodeRef of Class E_playerAccount = traveler.GetMyAccount()
    $Travel._ChangeAreaRequest( account, 9223372060865132781, "3" )//Test3 Area
  .
.

5
Design & World Building / Path System Problem
« on: Feb 15, 13, 12:07:48 PM »
I have an area set up as a cave area with inverted height maps used as the ceiling.
For some reason this area will not spawn mobs from the mob spawner.
Error says invalid point (0,0,0) in the region

And if I use command /henpc createfromspec (which places the mob at the character and sets its leash origin there)
It doesnt wander around.
I thought it may be because of the inverted height map so I set that to ignore npcs.
If I set the region to autosnap to ground it moves up to the ceiling
I tried changed the region height to 3 which looks like it intersects both heightmaps, but no affect.

It appears the inverted height map may not be the problem because,
I created another area ctrl+d copied the heightmap , moved it up and inverted it
Stitched the edges to make a cave with no exit
/henpc and the mobs wander around like normal.

One cool thing I found is if I lock the ceiling heightmap
I can edit the ground heightmap without affecting the ceiling which is nice.
But these are the agent debug messages
/henpc
Code: [Select]
Registered 9223372066249134807 with $AiMasterBrain standard system
---SoloAIAgent: Event received: UpdatePosition---
Initializing my agent
Wander Type: LEASHED
PriorityList initialized
Initializing my Tactical AI
evaluating 3
I am of the appropriate min level
I am of the appropriate max level...adding
evaluating 4
I am of the appropriate min level
I am of the appropriate max level...adding
Adding melee ability [3]; NPC STRIKE
Adding melee ability [4]; NPC OTHERSTRIKE
2 abilities in tactical list
My pursue type is LEASH
My pursue origin is (8.09834,-1.1173,0.0836295)
---SoloAIAgent: Event received: onAgentInitialized---
Post-Initializing Agent
Entities in awareness range: 0
-------------------------------
Evaluating goals [02/15/2013 17:45:38 UTC]
<SoloAiAgentClassMethods:LightweightEventRaised>
Wander type is LEASHED
[push SoloWanderGoal] Wander around a bit
Goal pushed successfully
---SoloAIAgent: Event received: PushGoal---
SoloWanderGoal received event "PushGoal"
[push SoloWanderState] I feel the need to roam
Waking up
Wander type is LEASHED
Already have a goal of type SoloWanderGoal
Got request 1754 back with invalid point
Path request 1754 failed, requesting new point
Got request 1755 back with invalid point
Path request 1755 failed, requesting new point
Got request 1756 back with invalid point
Path request 1756 failed, requesting new point
Got request 1757 back with invalid point
Path request 1757 failed, requesting new point
Got request 1758 back with invalid point
Path request 1758 failed, requesting new point
Got request 1759 back with invalid point
Path request 1759 failed, requesting new point
[pop SoloWanderState] Failed to get a valid point [Called by SoloWanderStateClassMethods:_PathSystem_PathFailed] [Called by SoloAiAgentClassMethods:_PopAgentState]
SO_entered informed of subject 9223372065196132748 (E_playerCharacter)
theNode is of type E_nonplayercharacter
Adding subject 9223372065196132748 to detectedPlayers list (1)
-------------------------------
Evaluating goals [02/15/2013 17:45:39 UTC]
<E_nonPlayerCharacterClassMethods:SO_entered>
Executing goal 1: (SoloWanderGoal)
[push SoloWanderState] I feel the need to roam
Entity 9223372065196132748 entered awareness range, but I'm already awake
Got request 1765 back with invalid point
Path request 1765 failed, requesting new point
Got request 1766 back with invalid point
Path request 1766 failed, requesting new point
Got request 1767 back with invalid point
Path request 1767 failed, requesting new point
Got request 1768 back with invalid point
Path request 1768 failed, requesting new point
Got request 1769 back with invalid point
Path request 1769 failed, requesting new point
Got request 1770 back with invalid point
Path request 1770 failed, requesting new point
[pop SoloWanderState] Failed to get a valid point [Called by SoloWanderStateClassMethods:_PathSystem_PathFailed] [Called by SoloAiAgentClassMethods:_PopAgentState]
and the mobspawn debug history
Code: [Select]
[02/15/2013 17:47:19 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:19 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:19 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:19 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:19 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:19 UTC] Profile "Entrance1" got request 2020 from territory 9223372065946133196
[02/15/2013 17:47:19 UTC] Profile "Entrance1" got request 2019 from territory 9223372065946133196
[02/15/2013 17:47:19 UTC] Profile "Entrance1" got request 2018 from territory 9223372065946133196
[02/15/2013 17:47:19 UTC] Profile "Entrance1" got request 2017 from territory 9223372065946133196
[02/15/2013 17:47:19 UTC] Profile "Entrance1" got request 2016 from territory 9223372065946133196
[02/15/2013 17:47:19 UTC] Profile "Entrance1" spawning 5 monsters
[02/15/2013 17:47:19 UTC] Profile "Entrance1" has spawn type "TERRITORY"
[02/15/2013 17:47:19 UTC] ---------------------------
[02/15/2013 17:47:19 UTC] Profile "Entrance1" handled event type "onProfileSpawn"
[02/15/2013 17:47:17 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:17 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:17 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:17 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:17 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:17 UTC] Profile "Entrance1" got request 2015 from territory 9223372065946133196
[02/15/2013 17:47:17 UTC] Profile "Entrance1" got request 2014 from territory 9223372065946133196
[02/15/2013 17:47:17 UTC] Profile "Entrance1" got request 2013 from territory 9223372065946133196
[02/15/2013 17:47:17 UTC] Profile "Entrance1" got request 2012 from territory 9223372065946133196
[02/15/2013 17:47:17 UTC] Profile "Entrance1" got request 2011 from territory 9223372065946133196
[02/15/2013 17:47:17 UTC] Profile "Entrance1" spawning 5 monsters
[02/15/2013 17:47:17 UTC] Profile "Entrance1" has spawn type "TERRITORY"
[02/15/2013 17:47:17 UTC] ---------------------------
[02/15/2013 17:47:17 UTC] Profile "Entrance1" handled event type "onProfileSpawn"
[02/15/2013 17:47:15 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:15 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:15 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:15 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:15 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:15 UTC] Profile "Entrance1" got request 2010 from territory 9223372065946133196
[02/15/2013 17:47:15 UTC] Profile "Entrance1" got request 2009 from territory 9223372065946133196
[02/15/2013 17:47:15 UTC] Profile "Entrance1" got request 2008 from territory 9223372065946133196
[02/15/2013 17:47:15 UTC] Profile "Entrance1" got request 2007 from territory 9223372065946133196
[02/15/2013 17:47:15 UTC] Profile "Entrance1" got request 2006 from territory 9223372065946133196
[02/15/2013 17:47:15 UTC] Profile "Entrance1" spawning 5 monsters
[02/15/2013 17:47:15 UTC] Profile "Entrance1" has spawn type "TERRITORY"
[02/15/2013 17:47:15 UTC] ---------------------------
[02/15/2013 17:47:15 UTC] Profile "Entrance1" handled event type "onProfileSpawn"
[02/15/2013 17:47:13 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:13 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:13 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:13 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:13 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:13 UTC] Profile "Entrance1" got request 2005 from territory 9223372065946133196
[02/15/2013 17:47:13 UTC] Profile "Entrance1" got request 2004 from territory 9223372065946133196
[02/15/2013 17:47:13 UTC] Profile "Entrance1" got request 2003 from territory 9223372065946133196
[02/15/2013 17:47:13 UTC] Profile "Entrance1" got request 2002 from territory 9223372065946133196
[02/15/2013 17:47:13 UTC] Profile "Entrance1" got request 2001 from territory 9223372065946133196
[02/15/2013 17:47:13 UTC] Profile "Entrance1" spawning 5 monsters
[02/15/2013 17:47:13 UTC] Profile "Entrance1" has spawn type "TERRITORY"
[02/15/2013 17:47:13 UTC] ---------------------------
[02/15/2013 17:47:13 UTC] Profile "Entrance1" handled event type "onProfileSpawn"
[02/15/2013 17:47:11 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:11 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:11 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:11 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:11 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:11 UTC] Profile "Entrance1" got request 2000 from territory 9223372065946133196
[02/15/2013 17:47:11 UTC] Profile "Entrance1" got request 1999 from territory 9223372065946133196
[02/15/2013 17:47:11 UTC] Profile "Entrance1" got request 1998 from territory 9223372065946133196
[02/15/2013 17:47:11 UTC] Profile "Entrance1" got request 1997 from territory 9223372065946133196
[02/15/2013 17:47:11 UTC] Profile "Entrance1" got request 1996 from territory 9223372065946133196
[02/15/2013 17:47:11 UTC] Profile "Entrance1" spawning 5 monsters
[02/15/2013 17:47:11 UTC] Profile "Entrance1" has spawn type "TERRITORY"
[02/15/2013 17:47:11 UTC] ---------------------------
[02/15/2013 17:47:11 UTC] Profile "Entrance1" handled event type "onProfileSpawn"
[02/15/2013 17:47:09 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:09 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:09 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:09 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:09 UTC] [9223372065950133300] Failed to get a valid point (0,0,0) from territory 9223372065946133196
[02/15/2013 17:47:09 UTC] Profile "Entrance1" got request 1995 from territory 9223372065946133196
[02/15/2013 17:47:09 UTC] Profile "Entrance1" got request 1994 from territory 9223372065946133196
[02/15/2013 17:47:09 UTC] Profile "Entrance1" got request 1993 from territory 9223372065946133196
[02/15/2013 17:47:09 UTC] Profile "Entrance1" got request 1992 from territory 9223372065946133196
[02/15/2013 17:47:09 UTC] Profile "Entrance1" got request 1991 from territory 9223372065946133196
[02/15/2013 17:47:09 UTC] Profile "Entrance1" spawning 5 monsters
[02/15/2013 17:47:09 UTC] Profile "Entrance1" has spawn type "TERRITORY"
Is this area just tainted from copying (ctrl+d) the original 32x32 heightmap
I've been doing that vs creating a large hieghtmap as that drops the fps down even with no textures applied
And I should just scrap the area

6
Developer Hero Projects / Solo Online - MMORPG
« on: Jan 21, 13, 10:40:04 AM »
Name: Solo Online
Genre: MMORPG (Massively Multi-player-Online-Role-Playing-Game)
Website: http://youtube.com/solommorpg
Game Update 1 (Part 1) http://youtu.be/_nDQtZgxreE
                         (Part 2) http://youtu.be/cy1xhiJtrik
Teaser Video: http://youtu.be/KpUBdTAtlr4
Game Update #1 Video: http://youtu.be/rWcFfCxU7PA

Key Features: Large Open World, Dungeons,  Battlefields,
                       Crafting, Gathering, Farming, PlayerHousing, Mounts, Vehicles,
                       Custom skill aquisition tailored to each CombatStyle,
                       Able to change classes on the same character
                       Questing, Missions, Warfronts, Fame, Unlockable Classes
                       Combo System

Races: Human , Mech Biotech, Vir, Dwarf, Elemental

Classes: 16 Classes
              Starting classes are: Warrior, Monk, Sniper, Commando, Cleric, Bard, Sorcerer, Magician
              Unlockable classes  : Assassin, Samurai, Infiltrator, Mercenary, Illusionist, Tempest, Engineer, Beastmaster
              Some classes can equip multiple weapon types (ex. sword , axe, staff )
Abilities:
              By spending Ability points that are gained each level,
              players can recieve stat bonuses
              as well as learn new abilities.

Skills:   There will be various activities
            crafting, harvesting,  mining.
            Materials are aquired through defeating enemies, completing Warfronts(PvP , PvE, PvPvE)
            completing Boss Battles, and completing missions and quests.

Quests:   Standard, Solo, Group, Epic

Missions: Players can join War Legions
               and undertake missions of increasing difficulty,
               to gain higher status with the Legion,
               and gain new unlocks, rare items, Custom Buffs, etc.
               Missions utilize the Warfront system.

WarFront: Upon reaching higher mission ranks players will be able to:
                assist NPC Battle groups in accomplishing various tasks
                (Ex. take a base, defend a base, escort, PVP etc.),
                enlist npcs to aid them and more.

Combos:   When using abilities on enemies,
          the correct combination of ability use
          between Players
          can create a "Combo Effect" that deals Increasing damage
          to the target based on the level of the "Combat Effect"
          Players can even continue the combo chain to trigger
          additional Combo Effects.

Level Cap: The level cap is 300


(All screenshots are for demonstration only,and are provided to show system functionality that is in game already)


Project Status  1/3/14:
-Systems In place and functional-

Inventory, Shops, Mobspawns, Npc  with stats and levels, Npc Townfolk and Quest Givers,,

Abilities, Quests, Time of Day, Seamless World, Instanced areas

Custom Dynamic Characters, Static Characters, Character Progression,

Skills, Stats, Stat mods, Groups, News

Character Creation (Select race, class, citizenship, starting area, racial trait bonus,
                        starting weapons and armor based on class
Items ( armor, weapons, basic items, usable items)
          visualize and add stat bonuses on equip, remove on unequip.

7
E_Ability inherits from SpecDerivedObject, ObsListener, _IconSubjectInterface

Clicking on an abilityicon send a request to activate the ability.
But getspecBy key will not work even though the node has a speckey of 1
I can/sn and see  the oracle is AbilitySpecOracle
E_AbilityClassMethods-Client
Code: [Select]
method getMySpec() as NodeRef of Class baseSpec
  // May return none...always check
  println("SOMYSPECKEYIS (" +me.SpecKey +")")                          //(1)
  oracle as NodeRef of Class SpecOracle = me.getMySpecOracle()
  println("ORACLE IS (" +oracle +")")                                  // (1000000989)
  println("ORACLESPECKEY IS (" +oracle.GetSpecByKey(me.SpecKey) +")")  // (0)
  return oracle.GetSpecByKey( me.SpecKey )
.
I also have a privatereplicationgroup that does Requestspecbykey when a node is added.
but that doesnt seem do anything

8
Scripting & Programming / Clear all collection elements
« on: Jan 09, 13, 01:44:24 PM »
I have a GUI window button that calls the server and should clear all abilities from the character.
Code: [Select]
untrusted function RequestRemoveAll()
  account as NodeRef = SYSTEM.REMOTE.CLIENT
  var char = account.GetMyChar()
  var charAbilities = char.GetMyAbilities()
  println("PreQuickLookupLength (" +charabilities.AbilitiesQuicklookup.length +")")
  println("PreAbilityListLength (" +charabilities.AbilityList.length +")")
  // Clear Ability List
  clear charAbilities.AbilityList //destroy
  // Clear Quicklookup
  foreach key in charAbilities.AbilitiesQuicklookup
  //if (someCondition == true)
    remove key from charAbilities.AbilitiesQuicklookup destroy
  .
  // Reset the Skill and Ability Points
  mychar as NodeRef of Class E_playerCharacter = char
  mychar.AbilityPoints = mychar.E_level - 1
  if mychar.AbilityPoints <0
    mychar.AbilityPoints = 0
  .
  mychar.SkillPoints = 0
  mychar.Strength = (mychar.E_level * 1)
  mychar.Dexterity = (mychar.E_level * 1)
  mychar.Vitality = (mychar.E_level * 1)
  mychar.Agility = (mychar.E_level * 1)
  mychar.Intelligence = (mychar.E_level * 1)
  //Clear the skill history
  clear mychar.TrainedJobSkills
  println("PostQuickLookupLength (" +charabilities.AbilitiesQuicklookup.length +")")
  println("PostAbilityListLength (" +charabilities.AbilityList.length +")")
.
When I was removing a single ability i used
  me.RemoveCollectionElement( rability, destroy )       
   me.TransmitRemoveCollectionElementToClient( account, rability, destroy )
Is there a way to remove all elements from a collection
Or do I have to Iterate through a collection?

Also on the client AbilityListWindow it checks the AbilityOracle which is anchored to
System.Info.WorldAnchor
Should This Be System.Node.Prototypename?
Theres a 3 second screen freeze when opening the window.
Code: [Select]
method SoloCharacterAbilityListWindow_Populate()
  var clientarea = me.SoloCharacterAbilityListWindow_GetFlowContainer()
  clear clientarea.children destroy
  println("Populate the abilitylistwindow")
  var oracle = SYSTEM.INFO.WORLDANCHOR.GetAbilityOracle()
  var abilitiesNode = oracle.GetAbilitiesNode()
  oracle.addListener(me)
  println("Oracle node is (" +oracle+ ")" )
  println("Abilities node is (" +abilitiesnode+ ")" )
  abilities as List of NodeRef
  abilitiesNode.listCollectionElements(abilities)
 
  c as NodeRef of Class ExpandedInfoAbilityContainer
  foreach a in abilities
    where a is kindof PlayerAbility
      c = me.SoloCharacterAbilityListWindow_CreateControlForAbility(a, a.AbilitySource)
      add back c to clientarea.children
    .
  .
.
Because right now the problem is If I log off/log on
The ability list window is empty.
If I train One ability the AbilityListWindow has 10+ of the same ability.
Log off / on and its blank until I train an ability.

I don't have abilities that will have levels, instead the character stats affect the abilities damage.
Would It be better to use abilitylist(which is a list of id) to populate the window.

9
Scripting & Programming / [Resolved] Lists vs LookupLists
« on: Jan 08, 13, 04:57:02 PM »
Still working on an ability system which is like a TalentTree


Say I have Talents 1,2,3,4
1, 2, and 3 adds a stat bonus to the character, 4 adds a new ability
The character
has to have trait 1 to get trait 2 and so on.

So I tried adding a new replicated field to the character
TrainedJobSkills - list of string

I want to check if the list has the string
if it doesn't and the character can learn it
add the string to the list

Well I can use HAS because its not a lookuplist.
So I change the field to
TrainedJobSkills - lookuplist indexed by string of string
Has works but trying to "Add back" a string says it must be a list.

SoloTrainingClassMethods on the server
Code: [Select]
function CheckTrainedJobSkills (myclass as Enum Classes,myskill as Enum JobSkillLevels)as Boolean
  println("Checktheskills")
  account as NodeRef of Class _PlayerAccount = SYSTEM.REMOTE.CLIENT
  player as NodeRef of Class _PlayerCharacter = account.GetMyChar()
  char as NodeRef of Class E_playerCharacter = player
  text1 as String = myclass
  text2 as String = myskill
  textstring as String = text1 +text2
  println( textstring )
 
 
  when myclass
    is WARRIOR
      when myskill
        is t1_I_I
          if char.TrainedJobSkills has textstring
            println("You have already trained this skill")
            return false
          .
          add back textstring to char.TrainedJobSkills
          println("Adding this Job Skill Traing to the list")
          return true
        .
        is t1_I_II
          if char.TrainedJobSkills has WARRIORt1_I_I
            println("Char has first ability checking for second")
            if char.TrainedJobSkills has textstring
               println("You have already trained this skill")
               return false
            .
            add back textstring to char.TrainedJobSkills
            println("Adding this Job Skill Traing to the list")
            return true
          .
          println("Didnt have the first ability to train the second")
          return false
Or should I look at the HJ Token stuff?
Also at some point I want to copy some character info like level and equipped items
And change level and equipped items based on the CLASS(warrior,cleric) the character currently has.

10
I'm trying to make a gui to add and remove abilities for a character
I can add an ability, but trying to remove
I get Exceeded $callStackLimit (99)
Edit: works now i had to comment out
 loop i from 1 to me.AbilityList.length
      //if me.AbilityList = rability
        remove me.AbilityList at i
        println("Abilitylistlength is now(" +me.AbilityList.length+")(" +rability+")" )
        break
      //.
So I have functions in a server class SoloTraining
Which eventually go to a method in Abilities class
Code: [Select]
[hsl_debug] 9223372063121132752,4: SCRIPT[SoloTrainingClassMethods]: The Character Already Has this ability time to remove it
[hsl_debug] 9223372063121132752,4: SCRIPT[AbilitiesClassMethods]: RemoveAnAbilityFromList ok
[hsl_debug] 9223372063121132752,4: SCRIPT[AbilitiesClassMethods]: 9223372063269132768THISISTHEABILITY
[hsl_debug] 9223372063121132752,4: SCRIPT[AbilitiesClassMethods]: Abilitylistlength is (2)(9223372063269132768)
[hsl_error] 9223372063121132752,4: [Summerfell_01] SCRIPT ERROR: Exceeded $callStackLimit (99)
01/07/2013 11:14:43 UTC
Call trace:
  Script ObsListenerClassMethods line 16 me[id=9223372063305133131 class=collectionIterator]
  Script ObsSubjectClassMethods line 28 me[id=9223372062222132879 class=Abilities]
  Script CollectionClassMethods line 401 me[9223372062222132879]
  Script AbilityBarSettings line 153 me[9223372062222132879]
  Script AbilityBarSettings line 33 me[9223372062222132879]
  Script AbilityBarSettings line 138 me[9223372062222132879]
  Script AbilityBarSettings line 164 me[9223372062222132879]
  Script AbilityBarSettings line 33 me[9223372062222132879]
  Script AbilityBarSettings line 138 me[9223372062222132879]
  Script AbilityBarSettings line 164 me[9223372062222132879]
  Script AbilityBarSettings line 33 me[9223372062222132879]
  Script AbilityBarSettings line 138 me[9223372062222132879]
  Script AbilityBarSettings line 164 me[9223372062222132879]
  ...
  Script AbilityBarSettings line 171 me[9223372062222132879]
  Script AbilitiesClassMethods line 74 me[9223372062222132879]
  Script AbilitiesClassMethods line 113 me[9223372062222132879]
  Script SoloTrainingClassMethods line 275 me[0]
  Script SoloTrainingClassMethods line 164 me[0]
  Script SoloTrainingClassMethods line 112 me[0]
  Script SoloTrainingClassMethods line 24 me[0]
starting method/function REQUESTREMOVEJOBSKILL
starting me[id=0 invalid]

remote call from originating script SoloTrainingWindowClassMethods function RequestRemoveJobSkill node 1000003489 client 9223372055763132658
The methods to remove the ability in Abilities class
Code: [Select]
method RemoveAnAbilityFromList(char as NodeRef,myskill as ID)
  println("RemoveAnAbilityFromList ok")
//  SYSTEM.EXEC.CPULIMIT = 00:00:30
//  account as NodeRef = SYSTEM.REMOTE.CLIENT
//  var char = account.GetMyChar()
//  var charAbilities = char.GetMyAbilities()
 
  //var abList = me.AbilitiesQuicklookup
  //foreach key in abList
//    if key = myskill
    var ability = me.AbilitiesQuicklookup[myskill]
    println( ability +"THISISTHEABILITY")
    me.RemoveAbilityFromList( ability )
//  .
//.

.
Code: [Select]
method RemoveAbilityFromList(rability as NodeRef of Class E_Ability)
  if rability = None
    return
  .
  key as ID = rability.SpecKey
  char as NodeRef = me.GetMyAbilitiesPossessor()
  if char is kindof _PlayerCharacter
    println("Abilitylistlength is (" +me.AbilityList.length+")(" +rability+")" )
    loop i from 1 to me.AbilityList.length
      if me.AbilityList[i] = rability
        remove me.AbilityList at i
        break
      .
    .
    AbilityBarSettings:removeSlotForSpec(char, ABILITY, key)
    AbilityBarSettings:SendAbilityBarSettingsToClient(char)
    account as NodeRef of Class E_playerAccount = char.GetMyAccount() 
    if me.HasAbility(key)
      me.RemoveCollectionElement( rability, destroy )
    .       
    me.TransmitRemoveCollectionElementToClient( account, rability, destroy )
  . 
  me.UnReplicateAbility(rability)
  me.UpdateAbilitiesQuickLookup()
  if rability != None
    DestroyNode(rability)
  .
.

11
Scripting & Programming / [Resolved] Convert ID to noderef
« on: Dec 27, 12, 07:54:47 AM »
I'm trying to create a shop to buy items
I have Item and shop spec oracles similar to HJREF.
Right now I can right click on an npc and the shop GUI window
opens and displays the items as well as name and price.

I haven't registered a ShopSystemArea yet

I created a chat command which creates the item from spec
then does sendnodewithclasstoclient.
I have the items shown in my player inventory window and can drag and drop them.

Right now I have
ShopsClassMethos - serverside
Code: [Select]
untrusted function RequestSellItemToPlayer( rin as Class RemoteCallClientIn )
 
  item as NodeRef = rin.args["item"]
 
  // The item doesn't exist.  Either the client has been hacked, or the client data is out of date.  Hopefully just the latter.
  if item == None
  println("TheItemIsNone")
   
    //RemoveItemFromClientStorage(rin.args["item"])
  else
    println("Tryingtobuy the itemiselse")
    var shop = $SHOPS.getShopForItem(item)
Chat window prints out "TheItemIsNone"
item as id = rin.args["item"] and it printsout Tryingtobuy the item is else
ShopClassMethods - client
Code: [Select]
method RequestSellItemToPlayer(item as ID, slot as Integer, texture as List of Class texture_pair)
 
  Debug("Attempting to purchase item (" + item + ") for " + SYSTEM.EXEC.CALLEDBYSCRIPT + ":" + SYSTEM.EXEC.CALLEDBYFUNCTION)
   
  rout as Class RemoteCallServerOut
  rout.toScript = "ShopsClassMethods"
  rout.toFunction = "RequestSellItemToPlayer"
  rout.failScript = SYSTEM.EXEC.THISSCRIPT
  rout.failFunction = "ServerRMCFail"
  rout.args["item"] = item
  rout.args["slot"] = slot
  marshal texture to rout.args["texture"]
 
  RemoteCallServer(rout)
.

12
Hi all, I'm trying to bring over the mobspawn / mongen and Npc spec GUIS from HJRef and then modify them some.
I added MobSpawns to the hotspot menu referencing the script MONGENGUIClassMethods
it sends a chat command "/spawn GUI"

on the server I added cmdSpawn script and registered it with
/register add /spawn script="cmdSpawn"

when I click it in the hotspot menu I get this
Code: [Select]
[hsl_error] 9223372055803132715,0: [forest_01] SCRIPT ERROR: Exception DefinitionNotFoundException in function 'queryAssociation' definition not found: mobSpawnCollection
08/08/2012 14:31:21 UTC
Call trace:
  Script MobSpawnHandlerClassMethods line 1070 me[id=9223372060371132746 class=MobSpawnHandler]
  Script cmdSpawn line 10 me[9223372060371132744]
  Script commandHQ line 360 me[9223372060371132744]
  Script _CommandHandlerClassMethods line 144 me[9223372060371132744]
starting method/function _PROCESSCOMMAND
starting me[id=9223372060371132744 class=_CommandHandler]
I'm not sure where to look for the EXCEPTION DEFINITION
I get the same kind of thing for the NpcCombatant and NPCNonCombatant specoracles
Exception definition not found AlternateNPCDisplayNames

Another question I have is once a chat command is registered I dont see anything checking if its called from an edit instance or from a gamemaster what would stop the chat command from being called in game by anybody.

13
I made two areas with two different terrain textures
Changed their height to give them hills and valleys
Brought area2 to area 1 via seemles link
it looks ok, like the sand from one area blew over to the next

Area1 has no dynamic sky area 2 has a dynamic sky
As the character runs across the different terrain textures,
you can see that whatever terrain the character is standing on determines which area enviroment is used
what if the character was flying and wasnt touching the ground

In another two seamlessly linked areas
the heightmaps overlap and when I stitch or level/ramp
the textures clearly overlap and look ugly
from a distance you can see a thin peice of one of the terrains go up into the sky
if i slice off the end of one terrain and try to stitch
the character can walk over it but there's a cut line that you can see through the terrain

When there are two areas with different terrain is it best to
paint the terrain with the texture of the other terrain so you dont see a line showing one texture ending and the other beggining.

And if they were stitched uneven just bring in some static assets like a rock to just hide the seam?

14
Scripting & Programming / [Resolved] Character Statistics Window
« on: Jan 28, 12, 12:43:34 PM »
Hey all, I never wrote any script stuff before using the HeroEngine
But I feel pretty comfortable with it now though
(I can't log onto USWest22 right now so Hopefully I get this right)


-I used the gui editor to make a new window prototype and saved it - E_CharacterWindow
inherit from _window
add a _label        - change the name to Charactername
add another _label  - change the name to hitpoints

-Open the heroscript editor and open the XML
of the prototype we just created E_CharacterWindow
At the very top it should say something like <type=window>
change or add so it has <"Class=E_CharacterWindow">
Not sure but I think its written about like that



-Add an input to the gamekeybindings.ini file on the repository
Open the repository browser , open gamekeybindings.ini
In the Input_Command Layer
add OpenCharacterWindow = C

-Added to the client script input_command

Code: [Select]
is "OpenCharacterWindow"
    UseAnyNameYouWant as NodeRef of Class GUIControl = createNodeFromPrototype("E_CharacterWindow")
    UseAnyNameYouWant.build = true

Now pressing C will open the window (no text will appear)


Using the DOM Editor Create a class on the client

CharacterWindowGUI
type -guicontrol
Click Open Script, use empty script

Add the method to change the text for the labels

Code: [Select]
method OnControlBuild()
 
    acct as NodeRef of Class E_playerAccount = GetAccountID()
    char as NodeRef of Class E_playerCharacter = acct.GetMyCharacter()
   
    name as NodeRef of Class GUILabel = FindGUIControlByName(me,"CharacterName")
    HPSTAT as NodeRef of Class GUILabel = FindGUIControlByName(me,"hitpoints")
    name.text = char.name
    HPSTAT.text = char.E_hitPoints
.

15
Scripting & Programming / [Resolved] E_StatusBar
« on: Jan 26, 12, 12:10:30 PM »
I couldn't get a CharacterStatistics window to work so I went back to f with the E_StatusbBar

I thought I had lightweight events raised when the player action/energy(mana bar) change

here is my client E_playerCharacter
Code: [Select]
shared function _OnReplicationFieldUpdated(updateNode as NodeRef, updateField as String)
  when toLower(updateField)
    is "e_experiencepoints"
      $LightweightEvents.raiseLightweightEvent(updateNode, "xpUpdated", None) 
    .
    is "name"
      $LightweightEvents.raiseLightweightEvent(updateNode, "nameUpdated", 0)
    .
    is "e_hitpoints"     
      $LightweightEvents.raiseLightweightEvent(updateNode, "hpUpdated", 0)
    .
    is "Action"
      $LightweightEvents.raiseLightweightEvent(updateNode, "actionUpdated", 0)
    .
    is "Energy"
      $LightweightEvents.raiseLightweightEvent(updateNode, "energyUpdated", 0)
    .
    is "e_level"
      if $BASECLIENT._AreaID = 93383990054
        return
      .
      $LightweightEvents.raiseLightweightEvent(updateNode, "levelUpdated", 0)     
      me.EquipPlayerWeapon()
    .
client E_StatusBar
Code: [Select]
method lightweightEventRaised(subject as ID, eventType as String, data as NodeRef)
  when eventType
    is "nameUpdated"
      char as NodeRef of Class E_CommonCharacter = subject
      if char != None
        me.SetName(char.name)
      .     
    .
    is "hpUpdated"
      char as NodeRef of Class E_CommonCharacter = subject
      if char != None
        me.SetHP(char.E_hitPoints)
      . 
    .
    is "actionUpdated"
      char as NodeRef of Class E_CommonCharacter = subject
      if char != None
        me.SetAction(char.Action)
      .
    .
     is "energyUpdated"
      char as NodeRef of Class E_CommonCharacter = subject
      if char != None
        me.SetEnergy(char.Energy)
      .
    .
  .
.
method SetName(name as String)
  nameLabel as NodeRef of Class GUILabel = FindGUIControlByName(me,"nameLabel")
  nameLabel.text = name
.
method SetHP(hp copies Integer)
  if hp < 0
    hp = 0
  .
  healthSlider as NodeRef of Class GUIControl = FindGUIControlByName(me, "healthPanel.healthSlider")
  healthSlider.removeAnimations()
  var size = -1.0 * hp
  //1 field(string), the field on the GUIControl to such as size.x or defaultStatePresentation.color.a
  //2 min(float) (this is NOT the start value for the animation. That is the current value of the field to which you are applying the min/max values)
  //3 max(float)
  //4 duration in seconds(float)
  //5 repeat count(integer) (0=repeat infinitely, 1-n do animation that number of times)
  //6 reverse(boolean), forward and backward(true), or just forward(false)
  //7 curve(Enum of type interpolation curve), LINEAR, HOLD, EASE_IN, EASE_OUT, SMOOTH
  //8 restore(boolean), restores the orignal value after the animation is finished
  //9 delay in seconds(float), the amount of time to wait before actually starting the animation
  //10 id(string), the ID of the animation
  animationString as String = "size.x,"
  animationString = animationString + healthSlider.size.x + ","
  animationString = animationString + size +","
  animationString = animationString + .1 + ","
  animationString = animationString + 1 + ","
  animationString = animationString + "false,"
  animationString = animationString + "LINEAR," 
  animationString = animationString + "false,"
  animationString = animationString + "0,"
  animationString = animationString + "slide"
 
  GUIAnimation:addAnimation(healthSlider, "Interpolate", animationString)
  .
 method SetAction(Action copies Integer)
  if Action < 0
    Action = 0
  .
  actionSlider as NodeRef of Class GUIControl = FindGUIControlByName(me, "actionPanel.actionSlider")
  actionSlider.removeAnimations()
  var size = 1.0 * Action
  //1 field(string), the field on the GUIControl to such as size.x or defaultStatePresentation.color.a
  //2 min(float) (this is NOT the start value for the animation. That is the current value of the field to which you are applying the min/max values)
  //3 max(float)
  //4 duration in seconds(float)
  //5 repeat count(integer) (0=repeat infinitely, 1-n do animation that number of times)
  //6 reverse(boolean), forward and backward(true), or just forward(false)
  //7 curve(Enum of type interpolation curve), LINEAR, HOLD, EASE_IN, EASE_OUT, SMOOTH
  //8 restore(boolean), restores the orignal value after the animation is finished
  //9 delay in seconds(float), the amount of time to wait before actually starting the animation
  //10 id(string), the ID of the animation
  animationString as String = "size.x,"
  animationString = animationString + actionSlider.size.x + ","
  animationString = animationString + size +","
  animationString = animationString + .1 + ","
  animationString = animationString + 1 + ","
  animationString = animationString + "false,"
  animationString = animationString + "LINEAR," 
  animationString = animationString + "false,"
  animationString = animationString + "0,"
  animationString = animationString + "slide"
 
  GUIAnimation:addAnimation(actionSlider, "Interpolate", animationString)
  .
 
 method SetEnergy(Energy copies Integer)
  if Energy < 0
    Energy = 0
  .
  energySlider as NodeRef of Class GUIControl = FindGUIControlByName(me, "energyPanel.energySlider")
  energySlider.removeAnimations()
  var size = 1.0 * Energy
  //1 field(string), the field on the GUIControl to such as size.x or defaultStatePresentation.color.a
  //2 min(float) (this is NOT the start value for the animation. That is the current value of the field to which you are applying the min/max values)
  //3 max(float)
  //4 duration in seconds(float)
  //5 repeat count(integer) (0=repeat infinitely, 1-n do animation that number of times)
  //6 reverse(boolean), forward and backward(true), or just forward(false)
  //7 curve(Enum of type interpolation curve), LINEAR, HOLD, EASE_IN, EASE_OUT, SMOOTH
  //8 restore(boolean), restores the orignal value after the animation is finished
  //9 delay in seconds(float), the amount of time to wait before actually starting the animation
  //10 id(string), the ID of the animation
  animationString as String = "size.x,"
  animationString = animationString + energySlider.size.x + ","
  animationString = animationString + size +","
  animationString = animationString + .1 + ","
  animationString = animationString + 1 + ","
  animationString = animationString + "false,"
  animationString = animationString + "LINEAR," 
  animationString = animationString + "false,"
  animationString = animationString + "0,"
  animationString = animationString + "slide"
 
  GUIAnimation:addAnimation(energySlider, "Interpolate", animationString)
  .
if I add StatusBar.SetAction(addedNode.Action)
to E_playeraccount the ActionBar is black
Code: [Select]
statusbar as NodeRef of Class E_StatusBar = FindGUIControlByName(0, "game.E_StatusBar")
        if statusbar != None
          destroynode(statusbar)
        .
        statusbar = CreateNodeFromPrototype("E_StatusBar")
        statusbar.build = true
        statusBar.position.x = 0
        statusBar.position.y = 19
        statusBar.SetName(addedNode.name)
        statusbar.SetAction(addedNode.Action)
        $LightweightEvents.addLightweightEventListener(addedNode, "nameUpdated", statusBar)
        $LightweightEvents.addLightweightEventListener(addedNode, "hpUpdated", statusBar)
        $LightweightEvents.addLightweightEventListener(addedNode, "actionUpdated", statusBar)
        $LightweightEvents.addLightweightEventListener(addedNode, "energyUpdated", statusBar)
       
are these all the scripts needed to make it work?

Pages: [1] 2