Page 1 of 2 12 Last
  1. #1

    2E Ruleset Questions

    (Generic title in case can stick in small questions without constantly starting new threads)


    Celestian,

    I notice in several places that when an effect has sUnits set to "minute", it treats it as if it were Turns (10 mins) and when sUnit is null, it is treated as "minute"s
    Is there a reason for this sort of thing? I see that Hour and Day are not reinterpreted.


    examples:
    Code:
    ...
        if sUnits == "minute" then
          sDuration = sDuration .. " turn";
    ...
    function adndOnEffectAddStart(rNewEffect)
    --Debug.console("manager_effect_adnd.lua","adndOnEffectAddStart","rNewEffect",rNewEffect);
    	rNewEffect.nDuration = rNewEffect.nDuration or 1;
    	if rNewEffect.sUnits == "minute" then
    		rNewEffect.nDuration = rNewEffect.nDuration * nTIME_TURN;
    	elseif rNewEffect.sUnits == "hour"  then
        rNewEffect.nDuration = rNewEffect.nDuration * nTIME_HOUR;
      elseif rNewEffect.sUnits == "day" then
        rNewEffect.nDuration = rNewEffect.nDuration * nTIME_DAY;
    	end
    	rNewEffect.sUnits = "";

  2. #2
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    20,218
    Blog Entries
    1
    in AD&D 1E/2E there were combat turns and exploration turns.
    combat turns were 1min

    MoreCore - Generic Ruleset
    --- Projects ---
    Extensions | Tutorials | MoreCore | MoreCore Themes | Call of Cthulhu | Maelstrom | FG Con

  3. #3
    celestian's Avatar
    Join Date
    Jan 2017
    Location
    DFW, Texas
    Posts
    2,305
    Damned is correct.

    5E has round/minute/hour
    AD&D has round/turn/hour

    AD&D doesn't use minute as a duration, its rounds, turns or hours/days. Effectively round=minute in AD&D. I think in 5e a round is 6 seconds?

    Instead of re-writing all that code I changed the display so that I could continue to use updates/etc from new revisions. Similarly the descending/ascending AC... up/down, it's all the same. Just make sure the players see what they expect.
    Last edited by celestian; February 11th, 2020 at 06:49.
    ---
    Coding the Official AD&D Ruleset
    Documentation for AD&D 2E ruleset.
    My Twitch Channel for AD&D and FG related streams (See schedule for live days)
    My YouTube for FG related Tutorials and AD&D Actual Plays
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)

  4. #4
    Gotcha. It was to reduce changes to diff on updates.

    I don’t recall the round/minute thing difference in 5E, but easy enough to check once home. It all blends

  5. #5
    CombatTracker -> is <inventorylist> node an appendix thing, left over from when it used to be use?

    Tracing effects, noticed I would get called from char sheet, but never CT. Looking, realized no real "inventory in current CT - there is "actions" where inventory items (weapons) are placed but that isn't same thing. Was it there once and you cleaned it up for whatever reasons and the two ways to it were left? - or am I missing a path that requires some "CT add item" type button I didn't see?

    Code:
    ...
        -- watch the combatracker/npc inventory list
        DB.addHandler("combattracker.list.*.inventorylist.*.carried", "onUpdate", inventoryUpdateItemEffects);
        DB.addHandler("combattracker.list.*.inventorylist.*.effectlist.*.effect", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("combattracker.list.*.inventorylist.*.effectlist.*.durdice", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("combattracker.list.*.inventorylist.*.effectlist.*.durmod", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("combattracker.list.*.inventorylist.*.effectlist.*.name", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("combattracker.list.*.inventorylist.*.effectlist.*.durunit", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("combattracker.list.*.inventorylist.*.effectlist.*.visibility", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("combattracker.list.*.inventorylist.*.effectlist.*.actiononly", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("combattracker.list.*.inventorylist.*.isidentified", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("combattracker.list.*.inventorylist", "onChildDeleted", updateFromDeletedInventory);
    
        -- watch the character/pc inventory list
        DB.addHandler("charsheet.*.inventorylist.*.carried", "onUpdate", inventoryUpdateItemEffects);
        DB.addHandler("charsheet.*.inventorylist.*.effectlist.*.effect", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("charsheet.*.inventorylist.*.effectlist.*.durdice", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("charsheet.*.inventorylist.*.effectlist.*.durmod", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("charsheet.*.inventorylist.*.effectlist.*.name", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("charsheet.*.inventorylist.*.effectlist.*.durunit", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("charsheet.*.inventorylist.*.effectlist.*.visibility", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("charsheet.*.inventorylist.*.effectlist.*.actiononly", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("charsheet.*.inventorylist.*.isidentified", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("charsheet.*.inventorylist", "onChildDeleted", updateFromDeletedInventory);
      end
    ...
    If there isn't a way to add inventory to the CT, then removing the first set would be safe, correct?

  6. #6
    celestian's Avatar
    Join Date
    Jan 2017
    Location
    DFW, Texas
    Posts
    2,305
    Quote Originally Posted by Varsuuk View Post
    CombatTracker -> is <inventorylist> node an appendix thing, left over from when it used to be use?

    Tracing effects, noticed I would get called from char sheet, but never CT. Looking, realized no real "inventory in current CT - there is "actions" where inventory items (weapons) are placed but that isn't same thing. Was it there once and you cleaned it up for whatever reasons and the two ways to it were left? - or am I missing a path that requires some "CT add item" type button I didn't see?

    Code:
    ...
        -- watch the combatracker/npc inventory list
        DB.addHandler("combattracker.list.*.inventorylist.*.carried", "onUpdate", inventoryUpdateItemEffects);
        DB.addHandler("combattracker.list.*.inventorylist.*.effectlist.*.effect", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("combattracker.list.*.inventorylist.*.effectlist.*.durdice", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("combattracker.list.*.inventorylist.*.effectlist.*.durmod", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("combattracker.list.*.inventorylist.*.effectlist.*.name", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("combattracker.list.*.inventorylist.*.effectlist.*.durunit", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("combattracker.list.*.inventorylist.*.effectlist.*.visibility", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("combattracker.list.*.inventorylist.*.effectlist.*.actiononly", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("combattracker.list.*.inventorylist.*.isidentified", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("combattracker.list.*.inventorylist", "onChildDeleted", updateFromDeletedInventory);
    
        -- watch the character/pc inventory list
        DB.addHandler("charsheet.*.inventorylist.*.carried", "onUpdate", inventoryUpdateItemEffects);
        DB.addHandler("charsheet.*.inventorylist.*.effectlist.*.effect", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("charsheet.*.inventorylist.*.effectlist.*.durdice", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("charsheet.*.inventorylist.*.effectlist.*.durmod", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("charsheet.*.inventorylist.*.effectlist.*.name", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("charsheet.*.inventorylist.*.effectlist.*.durunit", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("charsheet.*.inventorylist.*.effectlist.*.visibility", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("charsheet.*.inventorylist.*.effectlist.*.actiononly", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("charsheet.*.inventorylist.*.isidentified", "onUpdate", updateItemEffectsForEdit);
        DB.addHandler("charsheet.*.inventorylist", "onChildDeleted", updateFromDeletedInventory);
      end
    ...
    If there isn't a way to add inventory to the CT, then removing the first set would be safe, correct?
    You add it to the NPC or the Character. For NPCs that's their version of a character sheet.
    ---
    Coding the Official AD&D Ruleset
    Documentation for AD&D 2E ruleset.
    My Twitch Channel for AD&D and FG related streams (See schedule for live days)
    My YouTube for FG related Tutorials and AD&D Actual Plays
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)

  7. #7
    PS: In response to "You add it to the NPC or the Character. For NPCs that's their version of a character sheet.", I meant the question is that there is no way to add an item to CT "inventory" that I could see. That results in an inventorylist entry in the CT (which is what is being tracked for NPCs)
    -------
    I was trying to see what triggers the two handler calls.

    For example, editing an item's effects on a character sheet -> the edit handler is called (per keystroke ) When I do that on same item which is in the inventory of an npc in CT, nothing happens.

    This appears to be because effects in CT is not setup like the handler. It is not setup in a path under inventory. Inventory is not "a thing" for CT as far as I can see?
    So if we want the same type of behavior, then different thins have to be monitored, right? Otherwise, you just modify the npc inventory, remove him from CT and re-add to CT to get new effects?

    Same behavior seen with update to carried by dragging new item or clicking from char/npc (yes/no) an item to be carried or not.

    If my interpretation is wrong, how do I trigger the logging of those (or either) two handler methods? How do I fire them with NPCs? (i.e., handling a CT change)


    Code:
    ...
    -- run from addHandler for updated item effect options
    function inventoryUpdateItemEffects(nodeField)
    Debug.console("manager_effect_adnd.lua","inventoryUpdateItemEffects","nodeField",nodeField);
    Debug.console("manager_effect_adnd.lua","inventoryUpdateItemEffects","DB.getChild(nodeField, ..",DB.getChild(nodeField, ".."));
        updateItemEffects(DB.getChild(nodeField, ".."));
    end
    -- update single item from edit for *.effect handler
    function updateItemEffectsForEdit(nodeField)
    Debug.console(">> updateItemEffectsForEdit -----");
    if nodeField then
    ...

  8. #8
    celestian's Avatar
    Join Date
    Jan 2017
    Location
    DFW, Texas
    Posts
    2,305
    Quote Originally Posted by Varsuuk View Post
    PS: In response to "You add it to the NPC or the Character. For NPCs that's their version of a character sheet.", I meant the question is that there is no way to add an item to CT "inventory" that I could see. That results in an inventorylist entry in the CT (which is what is being tracked for NPCs)
    -------
    I was trying to see what triggers the two handler calls.

    For example, editing an item's effects on a character sheet -> the edit handler is called (per keystroke ) When I do that on same item which is in the inventory of an npc in CT, nothing happens.

    This appears to be because effects in CT is not setup like the handler. It is not setup in a path under inventory. Inventory is not "a thing" for CT as far as I can see?
    So if we want the same type of behavior, then different thins have to be monitored, right? Otherwise, you just modify the npc inventory, remove him from CT and re-add to CT to get new effects?

    [/code]
    NPC sheets reside under the combattracker.* node path. combattracker.list.id-0001.inventorylist.*

    The reason the handler is there is if the npc has a item with an effect tied to it and changes carried state or the effect on it is modified.
    ---
    Coding the Official AD&D Ruleset
    Documentation for AD&D 2E ruleset.
    My Twitch Channel for AD&D and FG related streams (See schedule for live days)
    My YouTube for FG related Tutorials and AD&D Actual Plays
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)

  9. #9
    Celestian, that is what I expected - to see "inventorylist" under CT. However, in the campaign db.xml, I do not see this. I see the following for the Ankheg:

    As you can see, I tossed a few items on this ant for it to swing . They have effects, the effects get applied to the CT, no problem.
    But, changing them or adding them on the NPC Sheet has no effect on CT (not hits the callback for edit) - only changes to charsheet because that path with inventorylist does exist in character sheet. That path does not exist (for me?) in CT sheet for the NPC.

    Screen Shot 2020-02-24 at 1.41.31 PM.png

    Screen Shot 2020-02-24 at 1.37.45 PM.png

  10. #10
    celestian's Avatar
    Join Date
    Jan 2017
    Location
    DFW, Texas
    Posts
    2,305
    This is what I see.



    You can see the effect being applied and removed as I toggle the item on/off.
    ---
    Coding the Official AD&D Ruleset
    Documentation for AD&D 2E ruleset.
    My Twitch Channel for AD&D and FG related streams (See schedule for live days)
    My YouTube for FG related Tutorials and AD&D Actual Plays
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Log in

Log in