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.

Messages - Maldris

Pages: 1 2 [3] 4
31
as a general rule I would agree with you, My quest and dialogue and even the applied AI systems are all of my own design. However the spec system essentially had a premade version of what I wanted to do for items, the only problem is that as happens here, there are errors I'm unsure of the source, and at this point I don't have the time nor the desire to completely replace the system with something on my design.

Does anyone have any suggestions?

32
ran out of ideas for a fix, I switched to a different approach. I changed the existing string field which contained the texture fqn to be a tokenizable string that contained the xy position on the texture of the icon (size and the rest defined by context)

this all worked and I can edit specs freely again.

I created an additional ui to allow me to test these strings and the formatting and it works fine when working strait off in input string. However I added a field to load a given spec and display its icon as a test, this caused problems.

I'm currently using the foundation framework item spec with a changed base spec, however when using $SpecOracleUtils._getSpecOracleByClass() or $SpecOracleUtils._getItemSpecOracle() both return 0.

Are these methods only meant to be used on the server? looking through _GetItemSpecOracle() it should work on the client. I am confused by this as I have not altered that spec system at all, I didn't need to (apart from overriding _ItemSystem to add the new base spec)

Does anyone have any suggestions?
(and sorry about all this, I've been busy jumping between tasks so I haven't been exactly consistent in my responding)

33
Just tested also happens with newly created specs.

is it possible that this may be caused by it trying to edit a field that it may be interpreting as part of the user interface? I doubt this is the case but Im running out of ideas.

34
ok finally got back into test this, I removed the rotl_invIconVisualisation field and added item_iconFQN, this caused no problem, then adding default state presentation caused the same error once again.
as a way to test if this was caused by defaultStatePresentation being previously added as part of rotl_invIconVisualisation I also copied disabledStatePresentation and tried it as an alternative, this still caused the error, Im not sure as to the cause.

35
part of the field was, the string field, item_iconFQN,  was orriginally part of the spec, however its now a subfield of rotl_invIconVisualisation. (Note item_iconFQN was removed from the spec some time ago when I started planning this change)

would that potentially be the root of the issue?

36
Scripting & Programming / difficulty adding fields to ItemSpec
« on: Jul 28, 13, 07:31:51 AM »
ok this will be somewhat of a weird problem, and Im not sure if this should be wher eit is or under general scripting.

whats happened is that I created a field " rotl_invIconVisualisation" which is a class field consisting of a string and the system class field "defaultStatePresentation" (class uv). (and yes I copied all the classes between client and server, no spelling errors)

The purpose of this was to have a field that contained the texture FQN and the UV details for item icons within my inventory.

however when I added the field to both client and server versions of my spec class "E_ItemSpec" attempting to edit the spec throws an error (when I actually did the adding the other day this error did not occur and I was able to create and edit specs freely)
now when I removed the field from both I became able to edit the specs once more, although the first edit it showed the fields as still being part of the spec.

can anyone advise me as to how to add these fields to my spec in such a way as to not cause errors.

The error shown in the chat window was:

[hsl_error] CLIENT REMOTECALL FAILURE:
From Server Script: _SpecOracleUtilsClassMethods:_SendSpecToClientForEdit
Client/Account ID: 9223372055763132658 (0FAFFA68DA4780778BA40EFD9AB43764)
To Client Script: _SpecOracleUtilsClassMethods:_GotSpecForEdit
In function UnmarshalNode: XML Exception: SimuDomException: sp != mStart.npos at SimuDom.cpp(__LINE__)
07/28/2013 21:22:04
Call trace:
  Script MarshalUtils line 527 me[id=1000003657 class=_ItemSpecOracle]
  Script SpecOracleClassMethods line 220 me[1000003657]
  Script _SpecOracleUtilsClassMethods line 295 me[0]
starting method/function _GOTSPECFOREDIT
starting me[id=0 invalid]

the console and error panel outputs were almost identical, chat showed the most detail.

37
ok, I think Ill go with the decorator solution, will require some extra overrides around the place but that's fine.

However while testing to figure out an error in another part of the system I noticed that for some reason an error has started occuring when I create a new container (did not previously) looking through the code the most likely cause of this is that I missed something when I made the item container override, can anyone find something missing from the following? such as I forgot a method something or similar.

class E_ItemSystem  (glommed to system node)
    method HE_GetItemContainerSpecOracle

class E_ItemContainer (parent _ItemContainer)
    method getMySpecOracle

class E_ItemContainerSpec (parent _ItemContainerSpec)
    method createFromSpec
    method getMySpecOracle

class E_ItemContainerSpecOracle (parent _ItemContainerSpecOracle, also the class of the oracle prototype)
    method getValidBaseClasses
    method getSpecOracleClass
    method getSpecClass

the precise error being generated is
Quote
[GAME] setting up inventory for character: 9223372058349132665
[hsl_error] 9223372056361132662,0: [damtontest] SCRIPT ERROR: GetSpecByKey(2) failed to return a valid _ItemContainerSpec!
06/27/2013 04:22:26 UTC
Call trace:
  Script _ItemSystemClassMethods line 30 me[id=9223372058481132698 class=_ItemSystem,E_ItemSystem]
  Script E_playerCharacterClassMethods line 148 me[id=9223372058349132665 class=E_playerCharacter,_characterMoveState,_SocialPlayerCharacterDataOwner]
  Script cmdDev line 183 me[9223372058481132695]
  Script cmdDev line 72 me[9223372058481132695]
  Script commandHQ line 360 me[9223372058481132695]
  Script _CommandHandlerClassMethods line 147 me[9223372058481132695]
starting method/function _PROCESSCOMMAND
starting me[id=9223372058481132695 class=_CommandHandler]

and because its custom code the relevant section of E_playerCharacter is
Code: [Select]
method setupInventory()
  where me is kindof E_ItemContainerOwner
    container as NodeRef of Class _ItemContainer = $_ITEMSYSTEM._CreateItemContainerFromSpecKey(2)
    if !(me._HasItemContainerByName("inventory"))
      container._SetItemContainerName("inventory")
    .
    me._AddItemContainer(container)
  .
.

and cmdDev is just a general utilities chat command script that calls setupInventory() on the relevant node.

any thoughts as to what I missed or screwed up?

38
ok to sum up what I've done to this point, I've made an override to most of the _ItemSpec family and _ItemContainerSpec family so that my own instantiation classes are used etc.

what I'm wanting to achieve is be able to move around the order of items in the _containedItems lookupList on the overwritten item container (E_ItemContainer for simplicity) such as if I user were to drag an item from one slot to another in an inventory UI, thus the data back end would also change the order so that when the user opens the window again, their order change is persisted. (i.e. the 6th item in the list get moved such that is is the 3rd item in the list, or the 6th and 3rd items swap location)

My first thought when I was planning this (unfortunately away from a computer) was to use
insert <item> to <list> at <location>
to change the order, however when I took a look at the actual class I noticed that it was a lookup list and not a list (I'm assuming insert doesn't work with lookups as using a numeric key would add an additional entry, hence the HAS method)

the next simplest solution that came to mind was to rebuild the list with each operation but this is slow, really process intensive and could introduce issues with editing not being perfectly synchronous if I'm not careful.

As such I would like advice as to what other people would advise I do.

I apologise if what I've written is less than clear.

39
thanks, after checking I did find a section of the scripts I forgot to update, everything works fine now.
really surprised that I didn't notice that after checking 3 times -.-

40
in an attempt to migrate my planned item structure to this new system I tried to add new base classes to the system. When I did this creating new specs with these classes would run indefinitely, afterwards a spec would appear on the list but I am unable to edit it.

In an attempt to get around this I removed their inheritance form _itemSpec and added them as decorators instead, on glomming them onto a spec I once again loose the ability to edit the spec.

This issue only happens with classes which have a parented class. any suggestions?

(as a note my new base classes inherited twice, once from _ItemSpec to the item_equibableSpec class then to the specific type, in this case weapon and armour, so even after removing the _item spec inheritance from item_equipable the base classes, weapon and armour, still had 1 inheritance to item_equipable)

41
I wanted to check that my plans here are on the right track for this, any advice would be appreciated.
Im currently wanting to build my projects Political system. This will involve a lookup list of each groups relationship to each other expressed as an integer and needs to be accessible everywhere (will affect things like spawn rates and types, dialogue, etc)

The current plan is to store this data by having an always up area with a persisted node with the necessary fields and methods glommed onto it.

this area can then be the target of remote calls to tell it when to update its data, and use server-server replication to distribute the data if necessary (only necessary to particular areas if at all)

would this be a practical approach to this kind of system or not?
any recommendations would be appreciated as this is the first of the global systems I'm working on at this point.

42
ok this is not yet resolved, after testing with that method it is saying that that pathing is ready, its returning true every time, even when spawning fails.

also since adding this test, spawning does not follow through, it does make a request for a point but it appears no point is returned within 60 seconds (how long I waited) so the spawning notifications never trigger and a creature is not made.

43
Scripting & Programming / Re: intermittent ID reference
« on: Oct 10, 12, 05:04:16 AM »
ok finally got back to this after some time away and being sick.

some additional information to note.

I added a clause to the code that was basicaly

if noderef is 0
  tell me about it
  return
.

so that it would hopefully just skip over each erenous call. problem is it looks like the erenous call is what fixed the problem to work the second time as now it will take this path every time this method is reached.

in testing it faulted once during the start-up of the spawner (more or less expected), it then succeeded in spawning a creature and thereafter started and continued to return a zero reference.

This is the chat output
You have entered damtontest [area #9223372056361132662 instance#2].
[general] spawn timer ticked
[general] invalid region ref, returning
[general] spawn timer ticked
[general] current pop low: 0
[general] current Region: 9223372057422132669
[general] got Point, Spawning
[general] making creature.
[general] Initialising creature.
[general] spawn timer ticked
[general] invalid region ref, returning
[general] spawn timer ticked
[general] invalid region ref, returning
[general] spawn timer ticked
[general] invalid region ref, returning
[general] spawn timer ticked
[general] invalid region ref, returning
[general] spawn timer ticked
[general] invalid region ref, returning

so my assumption is that somehow the call to  $PathSystem._PathSystemGetRandomPointInRegionNode would correct the noderef to its intended value.

any thoughts?

44
Scripting & Programming / [Resolved] intermittent ID reference
« on: Sep 13, 12, 06:49:22 AM »
ok This is the strangest problem I've had so far.

I'm currently working on some spawner logic for my game. As part of this logic I need to find a random point inside a region node (to which the spawner class is glommed). in the glommed class is a field of type ID which contains the ID of the region node it was glommed onto and this is used in the _PathSystemGetRandomPointInRegionNode method.

however when I do this it was throwing an error that the region node was invalid every second time it ran.
I put a $chat command in just before this to print out the region reference and I discovered something odd.

each time there was a problem the field had been set to 0. However the next time the line ran it would be a valid reference to the intended node.

I am very confused by this as there is no part of my code that sets this field apart from in the chat command which initially gloms the class. As an extension of this error the current population of the spawner is also resetting when it reaches maximum but I believe this to be caused either by a part of my logic that I've missed or by the same problem.

Does anyone know what may be causing this? I'm willing to admit its probably some stupid error on my part.

Here is the chat panel output for the whole series (there are allot of $chat commands that I added while trying to debug this and other problems)

[hsl_debug] 0,0: SCRIPT[E_WorldClassMethods]: Eval world override: HE_PostOnAreaRegister().
[general] Waking Spawners.
[general] spawner waking up
[general] spawner waking up
[hsl_debug] 0,0: SCRIPT[E_WorldClassMethods]: Eval world override: HE_PostOnAreaRegister().
 * Maldris has left the area.
[logon] * Maldris has exited the world.
 * Maldris has entered the area.
You have entered damtontest [area #9223372056361132662 instance#5].
[general] spawn timer ticked
[general] current pop low: 0
[general] current Region: 0
[hsl_error] 9223372056361132662,5: [damtontest] SCRIPT ERROR: _PathSystemGetRandomPointInRegionNode received an invalid regionNode
09/13/2012 11:36:41 UTC
Call trace:
  Script _PathSystemClassMethods line 182 me[id=9223372057499132664 class=_PathSystem]
  Script creature_spawnerClassMethods line 53 me[9223372057460132671]
starting method/function CREATURE_SPAWN_TIMER_TICK
starting me[id=9223372057460132671 class=creature_spawner]
[general] spawn timer ticked
[general] current pop low: 0
[general] current Region: 9223372057422132669
[general] got Point, Spawning
[general] making creature.
[general] Initialising creature.
[general] spawn timer ticked
[general] current pop low: 0
[general] current Region: 0
[hsl_error] 9223372056361132662,5: [damtontest] SCRIPT ERROR: _PathSystemGetRandomPointInRegionNode received an invalid regionNode
09/13/2012 11:36:56 UTC
Call trace:
  Script _PathSystemClassMethods line 182 me[id=9223372057499132664 class=_PathSystem]
  Script creature_spawnerClassMethods line 53 me[9223372057460132671]
starting method/function CREATURE_SPAWN_TIMER_TICK
starting me[id=9223372057460132671 class=creature_spawner]
[general] spawn timer ticked
[general] current pop low: 1
[general] current Region: 9223372057422132669
[general] got Point, Spawning
[general] making creature.
[general] Initialising creature.
[general] spawn timer ticked
[general] current pop low: 0
[general] current Region: 0
[hsl_error] 9223372056361132662,5: [damtontest] SCRIPT ERROR: _PathSystemGetRandomPointInRegionNode received an invalid regionNode
09/13/2012 11:37:11 UTC
Call trace:
  Script _PathSystemClassMethods line 182 me[id=9223372057499132664 class=_PathSystem]
  Script creature_spawnerClassMethods line 53 me[9223372057460132671]
starting method/function CREATURE_SPAWN_TIMER_TICK
starting me[id=9223372057460132671 class=creature_spawner]
[general] spawn timer ticked
[general] current pop low: 2
[general] current Region: 9223372057422132669
[general] got Point, Spawning
[general] making creature.
[general] Initialising creature.
[general] spawn timer ticked
[general] current pop low: 0
[general] current Region: 0
[hsl_error] 9223372056361132662,5: [damtontest] SCRIPT ERROR: _PathSystemGetRandomPointInRegionNode received an invalid regionNode
09/13/2012 11:37:26 UTC
Call trace:
  Script _PathSystemClassMethods line 182 me[id=9223372057499132664 class=_PathSystem]
  Script creature_spawnerClassMethods line 53 me[9223372057460132671]
starting method/function CREATURE_SPAWN_TIMER_TICK
starting me[id=9223372057460132671 class=creature_spawner]
[general] spawn timer ticked
[general] current pop low: 3
[general] current Region: 9223372057422132669
[general] got Point, Spawning
[general] making creature.
[general] Initialising creature.
 * Maldris has left the area.
[logon] * Maldris has exited the world.
 * Maldris has entered the area.
You have entered test [area #9223372055865132662 instance#0].
Shutting down area 9223372056361132662 instance 5.
[general] spawn timer ticked
[general] current pop low: 0
[general] current Region: 0
[hsl_error] 9223372056361132662,5: [damtontest] SCRIPT ERROR: _PathSystemGetRandomPointInRegionNode received an invalid regionNode
09/13/2012 11:37:41 UTC
Call trace:
  Script _PathSystemClassMethods line 182 me[id=9223372057499132664 class=_PathSystem]
  Script creature_spawnerClassMethods line 53 me[9223372057460132671]
starting method/function CREATURE_SPAWN_TIMER_TICK
starting me[id=9223372057460132671 class=creature_spawner]
[general] spawn timer ticked
[hsl_debug] 0,0: SCRIPT[E_WorldClassMethods]: Eval world override: HE_PostOnAreaRegister().



Suggestions anyone?

45
hmmmmm well I know there is an npc of that name, I copied the name returned by /henpc list npcs so I doubt that's the problem, As for it not being-of the right class, I find that unlikely too as the overwritten part of the npc system node stipulates the E_nonPlayerCharacter class as the class to instantiate from, and that was the case before I created this npc ... any suggestions? if not I may gut this feature and start over, I may have missed something somewhere.

also as a note as I know someone will berate me for using the prefix E_ for these classes, we wanted core systems like npcs and system node overrides to have a different prefix so we went with that, it helps make things clearer :P
I don't really understand everyone's aversion to the use of that prefix

Pages: 1 2 [3] 4