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 - Hiro_Protagonist

Pages: [1]
1
GUI Creation / Layer Manipulation
« on: Mar 13, 14, 04:44:17 PM »
Hey, I'm playing with the Layer mechanics, and they don't seem to be doing anything. I have created my own class to override the functionality in $GUI, MO_GUI (based on E_GUI), and adjusted the system node. I added my own override for HE_validGuiLayersList, with a new "dashboard" layer:

Code: [Select]
method HE_validGUILayersList() as List of String 
  layers as List of String

  add back "bottom" to layers
  add back "nameplates" to layers
  add back "default" to layers
  add back "game" to layers
  add back "dashboard" to layers
  add back "cinematics" to layers
  add back "guieditor" to layers
  add back "guieditorutilities" to layers
  add back "alert" to layers
  add back "hotspot" to layers
  add back "tooltips" to layers
  add back "contextmenu" to layers
  add back "cursor" to layers
  return layers
.

Then I created a function to show a requested dashboard. The prototype's topmost control is set to layer=dashboard:
Code: [Select]
method ShowSystemAreaDashboard(dashboardControl as String)
  // Hide all the other stuff
  $GUI._pushGUILayerState(dashboardControl)
 
  // Find the specified gui control
  dashboard as NodeRef of Class GUIControl = FindGUIControlByName(0, "dashboard." + dashboardControl)
 
  // Destroy it, we're going to rebuild it
  if dashboard != None
    destroynode(dashboard)
  .
 
  // Create a new dashboard.
  dashboard = CreateNodeFromPrototype(dashboardControl)
  dashboard.build = true
 
  // Hide all the non dashboard layers
  var layer = dashboard.getMyLayer()
  layer._hideAllOtherLayers()
.

Which all makes sense to me, but it doesn't work. When I call ShowDashboard, the dashboard shows up but none of the other layers are hidden. The Wiki is kind of out of date with the Layer stuff, at least the "Layer State Snapshots" part that says the actual layer object has _pushGUILayerState, but now the $GUI system node has it. So that said, I'm definately doing something wrong. I want to show my dashboard, hide everything else, and then call HideDashboard and restore the other GUIs.

Thanks again for your help!

2
I made two topics for these questions to make them easier to search later on.

My second question is proxyLocal/proxyForward and server-client replication. I totally get what those modifiers do on server<>server replication. But I can't find anything about client<>server. Do these have any use in client-server, or documented behavior? Since you have to map the server class to a client class (Destination Class (Client)), seems like you could not guarantee both DOM definitions would have the same methods, but you can also map server-server nodes to different classes (Destination Class (Server)), which would seem to me to have the same problem. Can anybody give me the lowdown on this? What happens if a proxyForward method on your destination class has no counterpart on the source class? Is this detected by the compiler, throw a script error, or just unguaranteed behavior?

As a note, in the wiki, it states that calling a method on a proxied node without one of these modifiers will produce a script error. I am calling a method on client proxied nodes without issue, so it seems that the proxy modifiers are only for server-server replication, but I'd like to know all the ins and outs.

3
I just got replication working pretty much how I want it to, and for the most part everything is working awesome.

I have two quick questions that I can't seem to figure out. To make searching and answering easier, I've made two separate topics.

First question: My debugging messages are all doubled! Once I enter the area and the nodes start replicating, I get doubled debug messages such as below (GlobalDataAnchor is the primary node in my replication group)

[Debug] [GlobalData](GlobalDataAnchorClassMethods) _SO_appeared event raised
[Debug] [GlobalData](GlobalDataAnchorClassMethods) _SO_appeared event raised
[Debug] [GlobalData](GlobalDataAnchorClassMethods) client added to replication
[Debug] [GlobalData](GlobalDataAnchorClassMethods) client added to replication
[Debug] [GlobalData](GlobalDataAnchorClassMethods) Recieved proxied node 9223372057563021553
[Debug] [GlobalData](GlobalDataAnchorClassMethods) Recieved proxied node 9223372057563021553
[Debug] [GlobalData](GlobalDataAnchorClassMethods) Classes on proxied node: GlobalDataAnchor
[Debug] [GlobalData](GlobalDataAnchorClassMethods) Classes on proxied node: GlobalDataAnchor
[Debug] [GlobalData](GlobalDataAnchorClassMethods) Recieved proxied node 9223372057563021565
[Debug] [GlobalData](GlobalDataAnchorClassMethods) Recieved proxied node 9223372057563021565
[Debug] [GlobalData](GlobalDataAnchorClassMethods) Classes on proxied node: AttributeDefinition
[Debug] [GlobalData](GlobalDataAnchorClassMethods) Classes on proxied node: AttributeDefinition
..... etc.

All the code is based on the Replication Tutorial. I only have a single replication group (\qn in the console confirms), and I'm sending these via $debug.SendNotifyDebugMessage. All my other debug messages are singular, but everything dealing with replication is doubled. I kind of thought it might be a client/server issue but then I'd expect the order to be messed up. Anybody have any ideas as to what is going on?

4
GUI Creation / Hiding Tab Panels in the GUI Editor
« on: Mar 11, 14, 12:25:49 PM »
Quick question: I am creating a tabbed GUI, based on the wiki (http://hewiki.heroengine.com/wiki/GUI_Tabs). However, it is really difficult to actually build the content in the tabs because everything is visible- I see all the tabs all the time, overlapping. Other GUI editors allow you to hide the tabs so you can edit just one at a time- HE must have this so I must be missing something basic, but for the life of me I can't figure out how to make this easy!

Edit: things I've tried:
Set the panel to visible=false
Set the panel to enabled = false
Right click everywhere

Last remaining idea:
Build the tabs as separate GUIs and add them dynamically to the tab set. This seems like major overkill though.

5
GUI Creation / Pattern for an Editor GUI?
« on: Mar 11, 14, 12:19:51 PM »
Hey, I'm hoping somebody can point me in the right direction a bit.

I have some nodes on one particular server that hold some dynamic data- they have to be normal nodes, not prototypes. Ordinarily, these nodes sit around and only the server and some other servers know about them- they are not replicated to the client.

I need to make a GUI that allows you to edit these nodes, and I'd like to know what the general pattern for this is?

I think what I need to do is set the nodes up to be replicated to the client (when I am in that particular area). I can then build a GUI based on the proxies. Changes to the data in the client proxy nodes should be replicated directly to the Server nodes. For some reason, it seems like there are complications involved here, though. I appreciate any guidance you can give me!

6
Sorry for the crazy title, but I feel like I am RIGHT THERE with my understanding of HeroEngine, but no matter how many times I read the wiki I can't seem to put together a couple of last questions.

I have overridden the clean engine $AREA scripts by unglomming the E_Area object and adding my own MO_Area object. No problem, I understand that- all areas now have the code in our MO_AreaClassMethods script. Cool.

What I can't quite noodle out is how to override the code in a particular area. I have my SkillSystemArea, and I want that particular area to have it's own code (HE_PostOnAreaLoad, stuff like that), that overrides what is in the basic MO_Area script. If I glom a new class to that $AREA node, that area will get the new fields and the new script- pretty sure I understand that. But does that persist? If the area goes down, does it come back with the glommed class, or do I need to re-glom it every time? If I do need to re-glom it, is there a good pattern for this? Currently, I have in the MO_AreaClassMethods:HE_PostOnAreaLoad code something that looks like this:

if area.ID = MY_AREA_ID
  glomClass("SkillSystemArea", area)
.

This just doesn't seem like a good way to do this*.

Next, after I glom the class on, does the glommed class override the callbacks? For instance, can I define my own HE_PostOnAreaLoad function in SkillSystemAreaClassMethods? Do both functions get run, or does one take precedence? And if there is precedence, how is it decided? I get how glomming works vis a vis fields and the flat namespace.

I have been trying to figure this out via the clean engine Chat, lobby and social systems, but they have quite a bit going on and I'm still not sure how the _SocialSystemArea makes contact with the code in _SocialSystemClassMethods - there is the $_SOCIAL system node that the world and area scripts call on, but how it is populated I still don't quite understand.


* Separate question:  There seems to be a lot of times in the engine were I need to run some bit of HS just once- glom a class onto a persisted node, or changing the data in a prototype for instance. What do people generally use to accomplish this? The tutorial videos seem to make use of Chat commands inside a throwaway class- is this normal, or is there a better way, or is it really that if you are writing one-time only code you are doing something wrong? Or is it that I really just need to learn the CLI and do it that way?

Thanks everybody for your patience- I think I just about get it, and once it clicks I'll be good to go.

7
I'm laying out my first big system right now for our game, and I'd like to run it past the experts and make sure I'm going down the right track.

In our game, skills and abilities have mutable data concerning their formulas- how much it costs to upgrade a skill, it's component percentages, all the formula secret sauce- which is supposed to be changed in real time as the game evolves. This data needs to be accessible by all the area servers, but not necessarily by the client- usually when one of these formulas is used it would be via an RPC call. Some of it does need to go to the client, so we really have two different sets of data to keep track of.

All the skills and abilities also have non-mutable data, such as their names and descriptions, and eventually things like animation parameters and whatever else we would want to store in a prototype.

My plan is to have a system area, SkillSystemArea, where all the instances of the skills are created and stored in the GOM, and processing for the changes can be done. I could put a custom GUI dashboard in the area to allow us to monitor what's going on and set the data by hand before the AI parts are complete. Inside the SkillSystemArea, I would just associate the Skill nodes with the area node for the main persistence.

My original plan was to use just server-to-server replication to make the skill data available to the other area servers, but this also seems like a great use of the Spec system, as it is a hybrid of mutable and non mutable data. However, the spec system seems very much geared just for client-server replication, and not server-server.

My questions are:
1. Is this the right tree to be barking up at all?

2. Should I use the Spec System by itself (assuming it can do server-server replication properly), or do I need a hybrid system using Specs and server data replicated via a side channel?

Hopefully this makes sense, thanks for any advice!

8
I'm running into a problem while trying to create a command script. I'm trying to /register ADD a new command:

/register ADD MyTest script="MyTestClassMethods"

and I get this error back: Error: Commands must start with a / slash.

/register by itself returns the help, /register LIST and /register CHECK both seem to work correctly. Only significant modifications should be a few tutorials and the Adapting Clean Engine stuff.

Any ideas what I'm doing wrong? Thanks!

9
Scripting & Programming / Web API Hooks?
« on: Jan 22, 14, 10:03:09 PM »
Hey everybody. Just getting back into the Hero Engine after a long dalliance with Unity, so if this question is old news please forgive me.

Our game design has a basic requirement for a website through which we can access HE data. A long while back HE announced that they were working on some system to create a custom web API for your game. Did this ever come to fruition? What is it called if it exists, because I'm not finding it in the wiki, but then again I may just be blind. It's happened...

10
The game I'm working on is extremely player-created content oriented. Indeed, our first task is to set up a system sort of like the sims, which will allow players to rent a "warehouse" (an empty space) and then place objects onto a grid within.

Here are the things I think I understand, I don't see a problem from these aspects:
1. I'll need to define an arbitrary root node for the warehouse in order for it to persist in a non-edit instance.
2. I'll need a normal GUI XML file for the item selection system
3. Client-Server RPC ties the object placement on the client to the server node creation.

The method I think I need to use for the grid is to:
A. Define a point where the camera should sit, such that a grid can be overlayed on the display and line up with the defined grid positions in the warehouse.
B. Create a grid GUI, with some kind of hotpoints in it such that we can make the squares glow. I'm not sure if each square needs to be a separate GUI element or not; seems like this might make things easier.
C. Need to turn the cursor into a representation of the object they are going to place.

The grid GUI is really the sticking point. Just talking through it here, I think I have some good places to start in the wiki, but I'd still appreciate any advice you can give me. Thanks!

Pages: [1]