STAR TREK 2d20
Page 96 of 109 First ... 46869495969798106 ... Last
  1. #951
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075
    Quote Originally Posted by damned View Post
    I put all the resources into the save location for my RWP file so I can back it all up together
    Cool, that's what I was tryting to say (you know my comm-cross-to-bear... I don't express well) - so I will add something like this unless people have other suggestions:
    Code:
    -rw-r--r-- 1 DanDe 197609   4686 Jun  1 13:06 ADD_Ruleset_Notes.txt
    -rw-r--r-- 1 DanDe 197609  17938 Jun  1 13:06 logo.png
    -rw-r--r-- 1 DanDe 197609  11148 Jun  1 13:06 rulesetlogo.png
    -rw-r--r-- 1 DanDe 197609 302540 Jun  1 14:21 AdventuresDarkAndDeep.rwp
    drwxr-xr-x 1 DanDe 197609      0 Jun  1 14:21 AdventuresDarkAndDeep/
    ................................................................. resources
    ........................................................................ *.pngs and .jpegs, I'll probably create a resources/graphics/frames resources/graphics/icons etc... 
    
    then when I add to RW, I will point to those copies and my git is happy backing up the original files too
    PS - The page in atlassian docs where the LUA restrictions etc are discussed used to say what basic version of lua FG was using, I seem to recall either 5.1 or 5.3? I doubt it will matter, but this way if I access any lua references again and they changed something, I will read the right one.

  2. #952
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075
    Right, this is the save location:
    /d/Development/Ruleset Wizard/Adventures Dark and Deep
    the *.rwp is in that dir as is the folder created by RWP with all it's generated/saved stuff.
    I added a sibling "resources" to that generated folder (vs sticking my things inside it - if that's safe, I can move it all there too)

  3. #953

    Remove Effect Issues

    Okay, I am working on applying effects to a target based on the damage applied. Different hit locations have different effects. See Damage Condition.jpg for the section of code relating to left arm damage.

    The first time the arm is hit, the -1 effect is applied to the target. When the arm is hit again it should change to the -2 effect. Any further hits make the arm useless. I can apply the effect no problem and the code correctly determines if the location has been hit before to apply the next level of effect. The problem I am having is I cannot seem to remove the previous effect with the removeEffect function (this is calling the function from the Core RPG Rules).

    I don't think I have the code layout wrong as this is the same as the code I use for applying and updating the targets encumbrance level (see Encumbrance condition.jpg), which works correctly.

    Can anyone shed any light on my code to make it work?
    Attached Images Attached Images

  4. #954
    Was replying to wrong post on reply. Lol

    Brother Kelly

    Here is what I would try. Instead of typing out the effects each time type it once and set it to a variable. Can do it inside that script. Then you can call that variable instead of typing the string. I would need to go look at core but I bet it has to match so any white space or capital letter might throw it off.

    Also look at sCT node and rSource make sure you giving effectmanager the correct node.
    Last edited by bayne7400; June 2nd, 2023 at 18:17. Reason: Oops

  5. #955
    Hi Bayne7400,

    Thanks for your suggestions. I have added the effects as variables in the srcipt and also checked the sCTNode & rSource - they both gave the correct node.

    I took a copy of the manager_effect.lua and put it in my ruleset, then tracked the action through and added various Debug points. I found the issue was with the following line within the removeEffect function:

    if DB.getValue(nodeEffect, "label", ""):match(sEffPatternToRemove) then

    It appears that magic characters (-, *, $, etc) are not recognised so the next step was never actioned. I did a search on this and found:

    https://www.fantasygrounds.com/forum...gic-characters

    Adding the extra bits of code specified makes it work.

    I am going to see if this can be incorporated into the CoreRPG ruleset so I don't need to keep track of the manager_effect.lua script to check for changes after each FG update.

  6. #956
    Why not just write your own script. Since all your doing is matching

    local nodeEffect = DB.getChild(nodeCT,"effects")
    for _,vEffect in pairs (DB.getChildren(nodeEffect))do

    local sLabel = DB.getValue(vEffect, "label",""):lower()

    if sLabel == sName:lower() then
    vEffect.delete()

    end
    end

    sName in this case if your variable you declared. May need to add a check if no effects present so it returns false as well

  7. #957
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075
    Is this one thread the best way to ask questions about RW? Or is there a separate forum for this? I feel some answered questions would be better found if there were separate posts like in the normal ruleset creation forums

    Anyhow

    So, for now I am working with "explicit location placement", in fact, I do not see a way where you can leave out the "x position", "y position" data. But maybe those 2 can be used as "offsets" in some mode then it makes sense.

    But, when I looked at the official video tutorial, (and previously just trying different things) I couldn't figure the system out exactly.
    https://www.youtube.com/watch?v=YDR8...e59yE&index=30

    The above was the one I was using to try to understand "advanced anchoring" (didn't see one for "custom anchoring" but that's in the UI too)

    From what it said about "snapping to", it really doesn't The first icon control to the TEXT item example, FOLLOWS the bottom of TEXT. It doesn't snap to it. If you don't line it up explicitly, it retains the offset and folows or does weird stuff depending on location.

    I was somewhat familiar with the cool diagram/image of above, aboveleft,inside,right, inside,left, etc settings. The GUI for "Display Anchoring" on FW has me puzzled, I've tried some trial and error things but hjaven't grokked exactly how to use them.


    Is there any webpage, forum or video out there that goes over all the settings for that section? Display Anchoring?

    The proportional_layout component you can load for examples does most of it via lua code, not the way at least I recall it working if did manually in xml.

  8. #958
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075
    Oh... I missed this one from the MAIN site:
    https://www.youtube.com/watch?v=oyHfGbOXZF0

    It starts off saying that it doesn't use relative then goes into discussing likely some of what I want to know. So, since I aborted that experimentation and am back to the charsheet_main work, I will put a pin in it and listen to it tongiht or tomorrow.

    Since this is my 2000th post, I might as well as a new question vs waste it only on a "NM" (though still good to know if this one thread is the main way to post about RW, my first question above):

    I am going to start looking, but my first attempt didn't work - I set an "advanced template" for a banner and instead of hardcoding the Text, I was going to use a resource. This makes sense but I was surprised I didn't see next to Text a TextRes field. If I am not mistake, the author speaks Espanol (perdoname, no escribo bien y no quiero cambiar la lengua en Windows para los acentos y letras como enye) and probably should consider making it internationalization-friendly

    But... it might be there and I missed it.

    Anyhow, my first try was General->CustomProperties->PropertyName=textres, PropertyValue=char_label_stats
    I need to get ready to eat or I'd have tried other stuff, including unpacking it to see what it generates (which I will do after dinner) for a clue. But figure, if anyone knows or points me to right video, I can get head start.

    *fireworks for 2K posts*
    (of course, EACH of my posts probably goes over 2K CHARACTERS hehehe)



    EDIT: Haven't gotten called to dinner yet so I unpacked:

    Code:
          <label_charframetop name="abilities_title">
            <bounds>5,3,300,20</bounds>
            <static textres="charsheet_main_abilities_title_LabelCaption" />
            <textres>char_label_stats</textres>
            <readonly />
          </label_charframetop>
    Aha, interesting - it seems the lua script I grabbled concatenates the "default" name for textres. That's useful! I will definitely use that but for now, I wanted to replace it - so obviously the steps above were not correct and resulted in:
    <textres>char_label_stats</textres>

    in ADDITION to what the lua code did. I will play a bit more before go eat.
    Last edited by Varsuuk; June 4th, 2023 at 22:38.

  9. #959
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075
    Cool seeing the above result let me to try:
    General-CustomProperties->Attributes: textres="char_label_stats" PropertyName=static (no property value) and this resulted in->

    Code:
          <label_charframetop name="abilities_title">
            <bounds>5,3,300,20</bounds>
            <static textres="charsheet_main_abilities_title_LabelCaption" />
            <static textres="char_label_stats"></static>
            <readonly />
          </label_charframetop>
    Obviously, I would want to REPLACE the inserted by lua (my guess) static, but I can look at that and if not doable in RW, then modify the lua script to allow for it to be there already maybe.
    (FYI: This gets the desired results, since the one I wanted was second... but still more to do obviously)


    EDIT2: OOO ... the creation of these things is part of RW. Which is OK, except I really do not want to have a unique name for all of these since I will often share the string resource. I wonder if there is a way to turn that off?

    I would STILL definitely suggest to the Dev to make "textres" a visible option like "text" to set if it isn't already and he can DEFAULT it like he is doing but this lets the creator overwrite it if they want a different resource name.
    Last edited by Varsuuk; June 4th, 2023 at 22:51.

  10. #960
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075
    I tried to get fancy on the onInit() code for (char_labelframetop.lua from 2E) to make room for the Icon added to the banner (since using WYSIWYG layout didn't take into account the dynamically added icon) and I got the old:

    "setPosition: Embedded windows positions cannot be changed."

    My next try, since I always intend there to be an icon on this one is to put the icon invisibly on the "right spot" then indent my banner from that so it will leave space for it... or... wait... I could use do this in two parts to WYSIWYG it... I mean Cel did a great bit of code to dynamically set it up, but since I am using RW to do it, prob better to comment that out and put it as 2 pcs. (I hate just "adding to the x/y control position until it "looks right" since if later I move things around, I gotta reset it. This way at least I see the layout. Dunno, will try it.

    EDIT: Nope, more of a pain in order to keep "purity" - will just adjust explicitly until it looks good, then figure out the delta and make note of the delta in my book for future use of this template
    Last edited by Varsuuk; June 4th, 2023 at 23:54.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Bookmarks

Posting Permissions

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

Log in

Log in