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 - FI-ScottZ

Pages: [1] 2 3 ... 6
General Discussion / player.ini
« on: Oct 06, 17, 02:35:39 PM »
Thusfar, we have been storing and retrieving local player preferences in their Local Repository Cache via the client-side external functions SaveLocalRepositoryData() and LoadLocalRepositoryData() respectively.  However, that means that if we put out a new version of the LRC for download, their settings are wiped out.  We would prefer to store them in a text file but are unsure how.

I see there is a file in the install folder called player.ini which has lines in it as such:


It seems like that would be an ideal place to put user settings, but I don't know how or even if we can access it via HeroScript. I cannot find any reference to is in the HeroWiki.

Does anyone have any insight into this?

As a fallback, I can imagine we can write our own external functions to write to and read from a text file, but it would be nice if this was already available somehow.

Just a note that when I clicked the link from the top of the forums to the dashboard site,

Google Chrome told me its security certificate has expired. I can continue on to the site anyways, but thought I should bring this up.

Art & Art Pipeline / FMOD Studio Groups Working as Categories?
« on: Apr 15, 17, 11:01:47 PM »
In FMOD Designer we could assign sound events to "Categories" and in HeroScript we could use things like FMOD_SetCategoryVolume() and FMOD_SetCategoryMute() to adjust volume and mute for various named sets of sounds.

As we are switching over to using FMOD Studio, the research I have done seems to indicate that it uses Mixer Groups in place of categories. But thusfar when I play sound events from FMOD Studio bank files and have those events in sound groups, calling either of the above HeroScript functions prints an error message reading:

"ERROR:System:FMOD Error: (89) The requested event, event group, event category or event property could not be found."

Then I discovered VCA's in FMOD Studio and thought that might be it. First I assigned our sound group to a VCA, named the same thing, built the project, and re-uploaded all of the bank files to our repository, but still no luck. Then I noticed that even though the group was assigned to the VCA, the individual events in the group did not show that when I right-clicked them. So I assigned all of those events to the same VCA as well, built and re-uploaded.

Yet, it still does not recognize the group name.  Those script function work fine for the categories events were assigned to when using the old Designer-created files.

TLDR; Has anyone gotten the FMOD_SetCategory* functions to work on groups from FMOD Studio projects?  I do not know what could be the problem.

GUI Creation / Bug Found in GUI Editor Save Code
« on: Mar 04, 17, 09:55:44 PM »
I have noticed that when I use the GUI Editor, if I try to set a texture name into the material field of a control's alphamask AND set that alphamask size or position to anything non-zero, there is an error in the Console panel when I try to save the GUI:

ERROR:HeroScript::HeroMachine::ScriptError:Bad XML: Missing starting <

If I only set the position/size OR only the material, it saves fine.

For instance, setting only material will result in a line like this:
<alphamask material="SomeTexture.png"/>

Setting only size will result in lines like this:
  <size x="213" y="257"/>

But if I set both size and material and try to save, it attempts to write lines like this:
  <size x="213" y="257"/> material="SomeTexture.png"

You can see that the material setting is being placed after the size setting instead of immediately after the keyword "alphamask".  That results in the error since there is no "<" before "material".

I tried to read through the code to understand where it is going wrong, but could not track it down.  Anyways, it can be bypassed by manually writing the code properly in the xml file so that it looks like this:
<alphamask material="SomeTexture.png">
  <size x="213" y="257"/>

Just thought I should pass this along so it can be corrected in-engine at some point.

GUI Creation / How to Delete FX Subgroups
« on: Mar 01, 17, 12:13:52 PM »
If you have ever worked in the FX Spec Editor you should know that you can right-click on a task to get a popup menu to delete it. But you may have noticed that it does not work for the subgroups that might be there. (The picture below shows a sample hierarchy. The main cluster with the larger FX icon is considered the "Group" and when you drag an FX box onto it that creates a subgroup.)

Anyways, looking at the code I realized the authors had put in the Delete popup menu for _FXTaskIcon controls, but not for _FXIcon controls, which are the ones used for the subgroups.

So here is what I did to the client script _FXIconClassMethods, all based on how deleting _FXTaskIcon's works:

First I added the blue code to the ActivateProxyIcon() method:

method ActivateProxyIcon(args references Class GUIMouseEvent)
  // Clicking means we have selected this icon and want to
  // display it's properties
  #if debug
  var fxe = $FXEDIT
  if (me.IconSubject <> None)
    #if debug
      println("node = " + subj)
    var keys = $GUI.GetKeyStates()
    var screen = GetViewPortSize()
    editor as NodeRef of Class GUIControl
    if args.rightButton
      args.interrupt = true
if keys.altKey
      // This brings up josh's generic node editor which I have left in
      // only for occasional debug purposes
      // It SHOULD NOT be used for real editing
      editor = CreateNodeFromPrototype("NodePropertyEditor")
      editor.build = true
      editor.position.x = screen.x - editor.size.x
      editor.position.y = 0
    #if debug
      println("No subject")

Then I copied over these two methods from _FXTaskIconClassMethods into _FXIconClassMethods:

function CreateRightClickPopupMenu(c as NodeRef of Class GUIControl) as NodeRef of Class GUIControl
  popupMenu as NodeRef of Class GUIControl = c._addCleanEnginePopupMenu()
  popupMenu.script = SYSTEM.EXEC.THISSCRIPT
  // Add the menu items
  var menuitem = popupMenu._addPopupMenuItem("Delete")
  menuitem.script = SYSTEM.EXEC.THISSCRIPT

  return popupMenu
shared function onPopupMenuSelection(myMenuItem as NodeRef of Class GUIControl)
//  println("onPopupMenuSelection menuitem: " + myMenuItem + " name: " + myMenuItem.name)
  when myMenuItem.name
    is "Delete"
      var menu = myMenuItem.rootParent()
      if menu <> None
        var icon = menu.getMyPopupOverlord()
        if icon <> None
          where icon is kindof _FxIcon
            subj as NodeRef = icon.IconSubject
            if subj <> None
//              println("no subject")
//          println("no icon")
//        println("no menu")
//      println("Menuitem was: " + myMenuItem.name)

With those changes in place, you can right-click subgroups to delete them and everything inside of them.

Game Dev and Gaming / 3D Buzz Training
« on: Oct 19, 16, 05:03:02 PM »
I normally wouldn't post about stuff like this, but felt like this was something to share.

First is the site, https://www.3dbuzz.com.   I don't have any vested interest it; it is just a helpful site for tutorials on game development, art, and programming.  I have used some of their training in the past and it might be helpful to others.

Also, they posted notice that one of their founders is battling cancer and raising money for them, so I thought I would pass it along in case anyone is interested:



Scripting & Programming / Reconnecting clients to a game
« on: Sep 25, 16, 10:50:22 PM »
Has anyone experimented successfully with the reconnection mechanism in HeroEngine by enabling "allowReconnection" in unique method _OnPlayerConnectionDisconnect() of server class _Account?

I tried it out a little bit in the past, but found sometimes it would not seem to reconnect properly (I don't remember what the problem was off-hand). Plus there is still the issue of recreating the client-side state of things for the reconnected client.  I am at the point where I will be investigating this again and I am curious about anyone else's experiences.

General Discussion / Deletion of player account nodes
« on: Sep 09, 16, 02:43:55 PM »
Some questions for the engineers:

When we remove an account from a group via the dashboard, does that delete that account's _playerAccount root node?

If not, do _playerAccount nodes ever get deleted automatically?

Do we get notification in code of a _playerAccount being deleted?

We are collecting various analytical data, such as things related to characters. I found in the method HE_CSSDeleteCharacter() notification of characters being deleted so we can update our data, but if an account is deleted that would necessarily delete their characters as well and I don't know if that would call the above method or not. Also we might need to update data related to accounts.

If there is not notification, then it seems after we remove an account from the group we would need to manually call $ACCOUNT._DestroyAccountRootNode(), updating our analytics just before that.  Does that sound correct?

We recently hooked up the in-game web store to our $_BILLING system node override and it works well, though I had a few questions about it.

Basically what I have right now is in fulfillment I am incrementing an integer field on the player account.  Then in the rollback function I decrement that field by the same amount. But I am worried about possibly decrementing that field when it was not previously incremented.

Are the fulfillment and rollback functions mutually exclusive? That is, inside of the rollback function, should I assume the code in the success function did not happen? Or would I indeed need to reverse what was done for "success"?  Most importantly, would the rollback ever be called when the fulfillment function was not called?

Also, for this transaction we do not need a node created, but it seems that the way the system is written it requires some sort of node to be created. So I left it as the default _ExternalShopItem.  But we don't want these created persisted nodes to linger, so I am destroying it in fulfillment, as well as in the rollback function should it get to there.  Destroying it would not create any issues with this system, would it?

Scripting & Programming / remove me
« on: Aug 21, 15, 12:13:57 PM »
Never mind this, I misunderstood.  This topic can be removed.

Developer Hero Projects / Visions of Zosimos
« on: Jul 23, 15, 07:07:17 PM »
We have been fortunate to partner with eBash Video Game Centers in Indianapolis who are providing our PCs and booth space at GenCon next week.  Check out their page about it here:
I'm sure there are some gamers on here who plan to attend, so we hope to see you there!

General Discussion / Hololens
« on: Jul 15, 15, 01:06:33 PM »
I feel I already know the answer to this, but can you anticipate any HeroEngine support being made for Hololens?

Design & World Building / InheritParentVisibility
« on: Jul 14, 15, 09:45:15 PM »
We have some torches with particle effects on them in one of our areas, and they play fine in the edit instance.  But even though they were set to have hidden = false in Edit, every time we would start a new play instance from it, they were set as hidden = true.  After some investigation, I found that they had been parented to a model that was set as hidden, so the particle effects are apparently inheriting the parent visibility, this despite the face that inheritParentVisibility is set to false.  Unparenting the effect fixed the issue.

On this HeroWiki page, http://hewiki.heroengine.com/wiki/Flare, it says,
TRUE or FALSE. Determines whether the Flare inherits its visibility from the Parent if one is specified. (As of this release, this may not work.)
(emphasis mine)

That was last updated about 4 years ago, but I am wondering if it is currently the case that InheritParentVisibility does not function, and that visibility is always being inherited.

General Discussion / New SetCursor issues
« on: Jul 09, 15, 09:50:52 PM »
In a previous post I mentioned that SetCursorVisibility() does not seem to work unless it is set to the default cursor via SetCursor("").  That is still apparently the case.

But I had a work-around where in onCmdStart() of Input_Camera, when the DragRotate command was given, I would first call SetCursor("") then set it to invisible, and in OnCmdStop() set the cursor back to our custom one and make it visible again.

But recently (in the last month or so) the cursor stopped hiding when we rotate the camera.  I didn't have time to investigate until now, and here is what I found:

By running SetCursor("") off of a key command, I saw when I called that the cursor image only changed after I moved the cursor.  So I added in code that after calling SetCursor("") SetCursorPosition() was used to move the cursor a little.  That works off of a key command.  But it still did not work when I rotated the camera.   Looking at the difference between the commands, I saw that the key command was called in onCmdStop while the mouse command was in onCmdStart.  But if I put the key command in onCmdStart, it still worked.

So after I removed all of the commands from the mouse, the cursor still would not change when using the mouse.

As best I can tell, SetCursor("") does not reset the cursor image from a custom one (even when moving the cursor) while a mouse button is being held.  After releasing the mouse button, the image would finally change.

However, SetCursor() with a valid, non-empty FQN does change the image even while a mouse button is held.  So instead of using SetCursorVisibilty(false), we are using SetCursor() with a blank cursor image, and that seems to be working well.  So, we have a correctly disappearing cursor now, but thought I'd mention the issues with resetting the cursor.  Incidentally, we used a PNG image that is just a single transparent pixel, and it is fine.

General Discussion / GUIs on Billboards being affected by HDR
« on: Jun 27, 15, 05:29:33 PM »
I returned today to putting some guis on billboards via the CreateBillboardFromGUIControl() command, specifically in a game area.  I was finding that the gui was appearing a lot darker than it does when in 2D.  The billboard was set to ignore lighting, and setting its Diffuse property did not help, nor did adjusting the gui's presentation settings.  With a good deal of experimentation in a Clean Test area, I finally found that if HDR was enabled when CreateBillboardFromGUIControl() was called, the gui was dark, but if HDR was disabled when that function is called, the gui looks correct.  And then HDR can be enabled after that without affecting the look of the gui.

For reference, I attached some pics showing the normal look of the gui, and then after adding to a billboard while HDR is on.

I see in this old thread
that HDR cannot be turned off via script, so disabling-creating-reenabling is not an option, and could look bad anyways.

Could the way CreateBillboardFromGUIControl() works be changed to ignore HDR?  That would help a lot.

Pages: [1] 2 3 ... 6