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 4 ... 6
16
I don't know if it is just me, but since the Quartz.E update, when I open a control in the GUI editor, the Properties panel no longer shows the edited control's hierarchy (where one would add, remove or move controls) but only shows the properties themselves.  Did that tree get moved?  I viewed the panel at 1600x900, and even tried 1920x1080, but to no avail.

17
General Discussion / Quartz.E DOM Editor Controls Cut Off
« on: Jun 12, 15, 04:02:35 AM »
After the Quartz.E update, I was not able to find the controls to make the DOM editor not be read-only.  Then I made the window full screen (1600x900) and saw it at the bottom.  I find that for any size shorter than that, those controls get hidden behind the box with the properties of the selected item.

The attached pic shows them beginning to disappear at a window height of 898.

Maybe there is supposed to be a scrollbar for the overall window?

18
Is it all possible now, or through a new external function to be exposed later, for the Hero client to set the screen resolution?  It would help greatly to deal with pc's with different monitor setups/aspects.

19
General Discussion / Bug in new DOM Editor
« on: May 12, 15, 09:44:53 PM »
I found an issue in the new style of DOM editors when clicking a column to sort the list of filtered items.  For one, it seems to do a new search each time, which is time-consuming but not the issue. The problem is that it does not seem to respect the filter settings.

To recreate:
(Client-side DOM editor)
  • On the Fields tab, enter "size" into the text filter.
  • Uncheck the Description box.  That properly filters the list to a few dozen.
  • Click the Type column header to sort by type.
That results in a new listing with many items that do not have "size" in them.

20
General Discussion / Minor bug found in new DOM Editor Interface
« on: Apr 23, 15, 04:59:44 PM »
In the new DOM Editor interface I found what appears to be a small bug:

When "Read Only" is unchecked, for a class the Archetype and Package drop-down menus are enabled, which is fine.  It is actually interesting to think that Archetype and Package can now be changed for a class.  But I found that if I click Cancel to throw out any changes, the Package menu correctly stays enabled, but the Archetype menu becomes disabled.  It is only enabled again if I check "Read Only" and then uncheck it again.

21
I found that with a sortable collection which I had set allowMultipleSelections to false, it was still multiple selecting if I control-clicked items.  In investigating the OnMouseClick method of that class I found some issues with shift-clicking as well which relate to doing so while nothing is selected and having it select from the beginning. So I submit these code changes I made to that method for anyone interested.  I tested it, and now multiple selection works with both shift and control, and does not work at all when allowMultipleSelections is false.

The red code is what I changed, including moving the check of GetKeyboardModifiers() to be earlier in the method.

method onMouseClick(args references Class GUIMouseEvent)
 
  if args.source != me
    args.handled = true
    return
  .
 
  var sortableCollection = me._getSortableCollection()
  sortableCollection.GUIListItemWithFocus = me
  setKeyboardFocus(me)
  ctrl as Boolean
  alt as Boolean
  shift as Boolean
  GetKeyboardModifiers(ctrl, alt, shift)
  if not sortableCollection.allowMultipleSelections or not shift
    me.selected = not(me.selected)
  else
    me.selected = true //Do not deselect if shift-clicking
  .

 
//  // Check for parents handling the collectionrow mouse click
  parentControl as NodeRef of Class GUIControl = me.parent
  while ( parentControl.parent <> None ) and ( args.handled = false )
    if hasMethod(parentControl, "_onSortableCollectionRowMouseClick")
      parentControl._onSortableCollectionRowMouseClick(me, args)
    .
    parentControl = parentControl.parent
  .
 
  if not args.handled
    if me.script <> None
      if hasFunction( me.script, "onSortableCollectionRowMouseClick" )
        me.script:onSortableCollectionRowMouseClick( me, args )
      .
    .
  .
 
  if args.handled = true
    return
  .
 
  if not(sortableCollection.script == None)
    if hasFunction(sortableCollection.script, "onSortableCollectionRowSelection")
      sortableCollection.script:onSortableCollectionRowSelection(me, args)
      if args.handled == true
        return
      .
    .
  .
 
 
//  // check for parents handling selection
  parentControl = me.parent
  while ( parentControl.parent <> None ) and ( args.handled = false )
    if hasMethod(parentControl, "_onSortableCollectionRowSelection")
      parentControl._onSortableCollectionRowSelection( me, args)
    .
    parentControl = parentControl.parent
  .
 
  if not args.handled
    if me.script <> None
      if hasFunction( me.script, "onSortableCollectionRowSelection" )
        me.script:onSortableCollectionRowSelection( me, args )
      .
    .
  .
 
  if args.handled = true
    return
  .
 
  args.handled = true
 
  var rows = sortableCollection._getAllCollectionRows()
  if shift == true and sortableCollection.allowMultipleSelections == true
    lastClicked as NodeRef of Class GUIControl
    if sortableCollection.firstGUIListItemClicked != None
      lastClicked = sortableCollection.firstGUIListItemClicked
    else if rows.length > 1
      //Nothing selected, yet, so grab the first *visible* row:
      foreach row in rows
        if row.visible and row != me
          lastClicked = row
        .
      .

    .
    sortableCollection.firstGUIListItemClicked = lastClicked
    selecting as Boolean = false
    foundLast as Boolean
    if lastClicked == None
      foundLast = true
    .
    foundMe as Boolean
    foreach row in rows
      if row.visible
        if (row == lastClicked or row == me) and selecting == false
          selecting = true
        .
        if row == lastClicked
          foundLast = true
        .
        if row == me
          foundMe = true
        .
        if row.selected != selecting and row != me
          row.selected = selecting
          if not(sortableCollection.script == None)
            if hasFunction(sortableCollection.script, "onSortableCollectionRowSelection")
              blargs as Class GUIMouseEvent = args
              blargs.handled = false
              row.selected = selecting
              sortableCollection.script:onSortableCollectionRowSelection(row, blargs)
            .
          .
        .
      .
      if foundLast and foundMe
        selecting = false
      .
    .
  else if ctrl == false or sortableCollection.allowMultipleSelections == false
    moreThanOneChecked as Boolean
    foreach row in rows
      if row.visible
        if row.selected and row != me
          moreThanOneChecked == true
          row.selected = false
          if not(sortableCollection.script == None)
            if hasFunction(sortableCollection.script, "onSortableCollectionRowSelection")
              blargs as Class GUIMouseEvent = args
              blargs.handled = false
              sortableCollection.script:onSortableCollectionRowSelection(row, blargs)
            .
          .
        .
      .
    .
    if moreThanOneChecked
      me.selected = true
    .
    if me.selected
      sortableCollection.firstGUIListItemClicked = me
    else
      sortableCollection.firstGUIListItemClicked = None
    .

  .

  sortableCollection._recolorCollectionRows()
//  // check for parents handling selection
  parentControl = me.parent
  args.handled = false
  while ( parentControl.parent <> None ) and ( args.handled = false )
    if hasMethod(parentControl, "_onSortableCollectionRowSelectionEnd")
      parentControl._onSortableCollectionRowSelectionEnd( me, args)
    .
    parentControl = parentControl.parent
  .
 
  if not args.handled
    if not(sortableCollection.script == None)
      if hasFunction(sortableCollection.script, "onSortableCollectionRowSelectionEnd")
        sortableCollection.script:onSortableCollectionRowSelectionEnd(sortableCollection)
      .
    .
  .
  args.handled = true
.

22
I have been studying how the localization system works by tracing through the code and found this server method in _LocalizationClassMethds:

Code: [Select]
untrusted unique remote method _LOC_RequestReplicateTableEntriesToClient(account_id as ID)
  // TODO-LOC: untrusted functions should check that user has permission
  //           this can be done using the new authorizations external functions for the permission "__IsAllowedToModifyGOM"
 
  if not $LOCALIZATION._LOC_InLocalizationSystemAreaEditInstance()
   
    call area $LOCALIZATION._LOC_GetLocalizationSystemAreaID() instance 0 $LOCALIZATION._LOC_RequestCreateNewTableView( account_id )
    return
  .
  $LOCALIZATION._LOC_RequestReplicateTableEntriesToClient(account_id)
 
  //request a table view (factory and store in the manager then start replicating)
  $LOCALIZATION._LOC_RequestCreateNewTableView(account_id)

  //request a table view filter (factory and store in the manager then start replicating)
  $LOCALIZATION._LOC_RequestCreateNewTableViewFilter(account_id)
 
.

This is called when the user opens the Localization window, and if it is called from outside of the system area it works fine.  But if it is called in the system area, as is the case if you were to try to open the Localization window while in that instance, the later code in the method calls itself leading to an infinite loop.

I am not sure what it is trying to do in the case where it is called in the system area, but that is something to be looked at. Also, it is trusting the client to send the account ID rather than using SYSTEM.REMOTE.CLIENT.

23
I am working out a custom SelectBox gui control and noticed that in the _GUISelectBox class methods _addSelectBoxItem() and _insertSelectBoxItemAt() that there are lines that return the code before reaching the autosort code, as such:

Code: [Select]
  return thisItem
  if me.autosortSelectBox
    if me._dirtySortOrder == false
      me._dirtySortOrder = true
      me._startSelectBoxSortTimer()
    .
  .

I don't know if this was on purpose for some reason; just thought I'd point it out.

24
Scripting & Programming / GUIEditor code safety check
« on: Jan 06, 15, 02:42:19 PM »
So I recently had a problem when trying to open a gui in the GUI Editor.  When I did there was an error in the console reading, "requested node ID not found" for line 1719 of script GUIEditor, which is this:
Code: [Select]
createControl(l[2], p.position.x, p.position.y, p.size.x, p.size.y)So obviously the node 'p' is invalid.
Yet there is a check above as such:
Code: [Select]
    p = getPrototype(l[2])
    if(p == 0)
     GUIEditorCmd("CLOSE")
     $ALERT._CleanFadeAlert("No prototype with that name exists", 0:00:05)
     println("No prototype with that name exists")
     return
    .

Thus the code should not have gotten to line 1719.  After putting this line after the getPrototype() line:
Code: [Select]
println("p == None: "+(p == None)+" p == 0: "+(p == 0))I got "p == None: true p == 0: false".

So an invalid node can still be non-zero, thus the check should be
Code: [Select]
if(p == None)
This may not come up very often, but there is apparently a difference between checking a node ref for being 0 vs being None.

25
I have a question about how scripts, and the code within them, are handled by the Repository, and then stored and accessed from the Local Repository Cache.

I understand how assets such as textures get loaded: when they are attempted to be used first it checks memory, then the LRC, then streams from the server if the LRC version is out of date.

But when do the compiled scripts in the LRC get updated?

We have a separate world used for player testing, and sometimes I tried to update some of its scripts to put in a fix without having to wait for the next push, but occasionally there would be run-time errors such as "wrong number of parameters to a function call", or a "method is not defined" even though it clearly is in the submitted code.  Rebuilding the LRC from scratch fixes these, and perhaps it is not wise to attempt to edit the scripts directly, but instead just wait for a push.

However it makes me wonder: the push would (I assume) only update the scripts.  Would it also cause the LRC files to be marked out-of-date and get updated so it is compatible with the new scripts?

If one captures a primed LRC and has it installed with the game, that is a snapshot of the scripts from that time.  If after that scripts are updated and submitted to the server but a client is still using the old LRC, does the client need a new LRC (for the compiled script files)?



Also, are identifier names (those defined in the DOM editor such as field and class names) also stored in the LRC?  I have noticed that changing the name of a field can cause conflicts that are only resolved by remaking the LRC.

26
Game Dev and Gaming / Hackers attack Hearthstone
« on: Jan 02, 15, 09:16:02 PM »
One of our members brought this to my attention which others might want to consider if streaming games via Twitch or something similar.

http://www.dailydot.com/esports/amaz-firebat-archon-pinnacle-ddos/?fb=es

The summary is that a Hearthstone tournament was being streamed on Twitch and hackers were using DDoS attacks to interfere with the games as soon as they saw them being broadcast.

Grrr.  I hate hackers.  >:(

27
General Discussion / DebugTracker Variable HUD
« on: Oct 15, 14, 11:50:58 AM »
This wiki page mentions the "Variable HUD" for the DebugTracker* functions:
http://hewiki.heroengine.com/wiki/Debugging_HSL#Real-Time_Monitoring_of_Field_Values

But in the current HeroBlade interface, I do not see the button for it on the Render Options panel, or anywhere else.  Does anyone know where it is?

28
General Discussion / Client/Server issue when sending DateTime
« on: Aug 29, 14, 02:04:09 PM »
I recently discovered some inconsistency in how DateTimes are sent between client and server.  I have found that it usually compensates the time for the local client's time zone, but there is a case where is does not.

To recreate:
I created a class TestDateTime with the field _mt_startTime, and copied it so it is on both server and client sides.

Then defined these functions:

Server (in script cmdVoz)
Code: [Select]
function SendDTandTestObject(playerAcct as NodeRef of Class _playerAccount)
  dt as DateTime
  test as Class TestDateTime
  println("sending dt: "+dt+", test: "+test._mt_startTime)
  call client playerAcct VOZ:GetDTandTestObject(dt, test)
.
untrusted function GetDTandTestObject(dt as DateTime, test as Class TestDateTime)
  println("GetDTandTestObject dt: "+dt+", test._mt_startTime: "+test._mt_startTime)
.

Client (in script VOZ)
Code: [Select]
remote function GetDTandTestObject(dt as DateTime, test as Class TestDateTime)
  println("GetDTandTestObject dt: "+dt+", test._mt_startTime: "+test._mt_startTime)
.
function SendDTandTestObject()
  dt as DateTime
  test as Class TestDateTime
  println("sending dt: "+dt+", test: "+test._mt_startTime)
  call server cmdVoz:GetDTandTestObject(dt, test)
.

From server to client:
Quote
sending dt: 01/01/1900 06:00:00 UTC test: 01/01/1900 06:00:00 UTC
Quote
GetDTandTestObject dt: 01/01/1900 01:00:00, test._mt_startTime: 01/01/1900 01:00:00

From client to server:
Quote
sending dt: 01/01/1900 01:00:00, test: 01/01/1900 01:00:00
Quote
GetDTandTestObject dt: 01/01/1900 06:00:00 UTC, test._mt_startTime: 01/01/1900 01:00:00 UTC

As you can see, when I sent the same types from client to server, only the stand-alone DateTime was changed.  The field on the class object was not changed.  So it seems that might be a bug.

29
Design & World Building / HeroWiki clarification on Particles
« on: Aug 28, 14, 02:42:11 PM »
As I was brushing up on particle effects again, it occurred to me that the section Particle Specification
Ownership
states
Quote
A particle specification's "owning" area can be found in the property areaGUID.
However, it appears that areaGUID is actually the guid of the AreaNode in the owning area.  The actual owning area ID is found in both the Name and Folder properties.

Just thought I'd mention that since it initially had me a tad confused.

That page also has the line
Quote
SourceBlend & DestBlend Together these are the alpha blending factors. The combinations will be described later.
But there is no further description of the meaning of the values that can be assigned to them, nor could I find that anywhere else.  From my experience, one would most commonly set SourceBlend to source alpha and DestBlend to (1 - source alpha).  Does "INVSRCALPHA"  mean (1 - source alpha)?

30
Scripting & Programming / GR2Instance usage in scripts
« on: Aug 10, 14, 07:12:54 PM »
I recently looked through our server scripts and ones that were using the class GR2Instance were updated to also account for newer models which instead use class HGMInstance.

In the process I noticed that there are a few spots in the Clean Engine code which still reference GR2Instance, such as _EditHandlerClassMethods unique method _ApplyInstanceCloningRules().  I am guessing those references would need to be updated, as well, to handle HGMInstance models.

Pages: 1 [2] 3 4 ... 6