Page 3 of 4 First 1234 Last

Thread: Starship Stuff

  1. #21
    Lets lead with this:
    https://www.youtube.com/watch?v=-YoM9wHR0O0

    Thanks to Moon Wizard over in the workshop for assistance on helping get some of this going in the right direction.

    That took a while of pulling hair out, and as you can see the attack rolls, and places where you can choose what skill to use for a roll don't respond too well, but it's error free :-)

    Still the todo list is long even after that that gets sorted, as well as the nice extras I hope to be able to do. But for the sake of listing them, lets have a new todo list:

    1. Get the rest of the rolls to function, attack rolls, and alternative skill checks.
    2. See if I can't correct those DCs, and have it test against them so it automatically calls out sucess/failure.
    3. Get the gun damage to work.
    4. Get the glitching/malfuctioning/wrecked effects to be factored into the rolls.
    5. Start work on the initative tracker.
    6. Cry about the initative tracker being complicated.
    6.1 This really is complicated on gunners turns I need to be able to target sides of the ships, and if sucessful damaged, reduce SP for Arc, once depleted, reduce HP, if total damage greater than a critical threashold then trigger the breaking of them... maybe even have the science officer targetting computer factored in there.
    6.2 Re-read the rules on criticals, I cannot remember those too well.
    6.3 Re-read the errata on the rules for starship combat, cause I cannot remember them either.
    6.4 Cry because I did 6.2 fixed stuff accorrding to RAW, then did 6.3 and realised that the errata means I've gotta do some more work re-jigging stuff.
    7. Finish the initative tracker.
    8. Add a clear statuses trigger at the end of the round (this is important for the next bit)
    9. Add statuses to the ship for success/failure rolls.
    10. Add notes for the sucesses, such as divert to shields, put note up as to how much the PCs get to add into shield banks
    10.1 Do further calculations, on total shield points, and flag up if divert total would cause shields to exceed maximums.
    11. Cry some more as this list goes on forever.
    12. Automate more of the rolls.

    -- I think that sums up the starship stuff... but if I'm crazy enough, there's more!
    13. Sleep.

    14. Add rolls/DC checks to some of the skills and abilities of the players. Secretly the real reason I'm learning to code this, is because me (the GM) and the operative always, always forget about the flat-footed bonuses on trick-attacks, but can I work out how to target the NPC CR rating with modifier and make the roll use trick attack skill, and then automatically apply flat-footed for the operative attack, and then the round when it the attack succeeds.

    Anyway in the interests of not pushing myself too hard, and the fact I'm tired. I'm going to leave this here folks.

    Hopefully now progress will start to pick up until I hit the next stumbling block... the next major one will be working with the UI of Fantasy Grounds, adding a dynamic data to that screen.
    Last edited by Nutter4Ever; April 30th, 2019 at 20:55.

  2. #22
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    22,350
    Quote Originally Posted by Nutter4Ever View Post
    Lets lead with this:
    https://www.youtube.com/watch?v=-YoM9wHR0O0

    ...

    Hopefully now progress will start to pick up until I hit the next stumbling block...
    One big gotcha about FG development - "stuff" that works fine on the GM side, might not work fine on the player side. This is due to the GM being able to access (and change) all database nodes, whereas only one player at a time can own (change) a specific database node.

    If a window is shared with the players, then the corresponding database node (and usually all child nodes) will also be shared (made "public") but all of those players can't change that data.

    I don't know what your design goal is - that is, will the GM change all of the role buttons, etc. or will players do that? If your goal is to allow all of the players to change the buttons in the ship sheet, assuming the buttons are anchored on a database node (which they probably should be), it may not be possible that the ship sheet will work 100% as you intend. The best you may be able to do is that everyone can view but only the player with the captain role (and the GM) can change anything in the sheet.

    I thought I'd mention this now, even though it will probably cause more pulling out of hair (I no longer have any left), so that you can think about your design goals and how you might implement this.

    You can set the owner of a specific database node using this API command: https://www.fantasygrounds.com/refdoc/DB.xcp#setOwner
    Or, to set the owner of a node, and all child nodes, (assuming the "owner" flag is true) use this API command against a database node object: https://www.fantasygrounds.com/refdo....xcp#addHolder

    You can test player side operation by starting a second instance of FG on the same computer as the GM instance and "Join Game" with a server name of localhost - only do this for one player instance, don't run multiple player instances on the same computer (the player cache will get corrupt and not operate 100% correctly).


    FG Product Development status: Pathfinder Playtest Ruleset and add-ons: In development. Pathfinder Bestiary, Pathfinder Bestiary 2, Pathfinder Bestiary 3 (in store).

    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  3. #23
    Quote Originally Posted by Trenloe View Post
    One big gotcha about FG development - "stuff" that works fine on the GM side, might not work fine on the player side. This is due to the GM being able to access (and change) all database nodes, whereas only one player at a time can own (change) a specific database node..

    ..You can test player side operation by starting a second instance of FG on the same computer as the GM instance and "Join Game" with a server name of localhost - only do this for one player instance, don't run multiple player instances on the same computer (the player cache will get corrupt and not operate 100% correctly).
    I'm not one for lying. Most of that went clear over my head. However couple of things to point out :-) That video was from the players client (Bob) not the GMs.

    I learnt the hard way some of the difference between host/player clients configurations when my group first started using FG. Luckily, I had a housemate as a player at the time, so it involved some running up and downstairs to see what he was seeing and how players achieved some things. But it's all good.

    Although, acutally I think I'll need to fire it back up before I start coding somemore, add another character, other than Bob, Sue probably. Yeah add a Sue character. Then back out and in as Bob, and see if I can't get Sue as part of the crew (might need GM stuff for that) and Bob able to set things up, then back in as Sue and see what rolls can be made.

    Still my colleagues at work say I need a hair cut, pulling it out counts right? :-)

  4. #24
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    22,350
    Quote Originally Posted by Nutter4Ever View Post
    Although, acutally I think I'll need to fire it back up before I start coding somemore, add another character, other than Bob, Sue probably. Yeah add a Sue character. Then back out and in as Bob, and see if I can't get Sue as part of the crew (might need GM stuff for that) and Bob able to set things up, then back in as Sue and see what rolls can be made.
    Database node ownership is based off the player name, not the PC name as a player could be controlling more than one PC - the player name is set on the "Join Game" screen.


    FG Product Development status: Pathfinder Playtest Ruleset and add-ons: In development. Pathfinder Bestiary, Pathfinder Bestiary 2, Pathfinder Bestiary 3 (in store).

    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  5. #25
    Quote Originally Posted by Trenloe View Post
    Database node ownership is based off the player name, not the PC name as a player could be controlling more than one PC - the player name is set on the "Join Game" screen.
    Thanks for the heads up, but yeah, when I say Sue as a character, I also mean as a seperate login :-) If roleplaying games didn't cause me to have enough personalities as it is, now I'm having to run 3 personalities just to work on this ruleset.

  6. #26
    Saeval's Avatar
    Join Date
    Apr 2015
    Location
    West Palm Beach, FL
    Posts
    14
    This whole thread reads like the beginning entries of a journal that a scientist would have chronicling his decent into madness in a Cthulhu style game and I love it. I don’t know the first thing about coding so you may as well be speaking the tongue of the old gods lol

    But we’re here for you and cheering for progress but hold on to your sanity if not your hair and remember this is a hobby meant to be fun so if it’s not fun anymore then go find your fun again. But you’re doing amazing work and the helpless community of non-coders is rooting for you!

  7. #27
    I haven't said much until now but I am sure that I speak for most if not everyone when I say thank you for doing this for us! I have been manually doing most of the starship stuff and to see this has given me hope.

  8. #28
    Whelp, this has gotten into my head, and as I was getting off to sleep last night and the first thing on my mind this morning was. How is the DB structured for mutliple skills for the same check... and it's not good.

    Basically the node contains skill1, skill2, skill3, but at the moment my code just reads out skill1 etc. I'm going to have to do one of two things and not sure where to start on either:

    When the button is clicked I need information on which exactly is clicked, and I'm not sure if it currently gives any detail of the sort, it does pass "draginfo" but trying to concatenate that into a string and printing to screen results in a nil error, meaning it's not defined.

    Or

    I'm going to have to go deeper into the code and find where the skill nodes are getting created, and when creating them changed it so that it puts each and every skill into it's own node of the DB. However that might cause other issues, given I would have two+ nodes named the same thing, and when it comes to database it doesn't like that kind of things.

    Anyway that's just my thoughts for now, maybe another answer will present itself before I have to struggle with either of those thing.

  9. #29
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    22,350
    Quote Originally Posted by Nutter4Ever View Post
    When the button is clicked I need information on which exactly is clicked, and I'm not sure if it currently gives any detail of the sort, it does pass "draginfo" but trying to concatenate that into a string and printing to screen results in a nil error, meaning it's not defined.
    "draginfo" is dragdata that is created as part of a drag action (the beginning of the drag/drop process), info here: https://www.fantasygrounds.com/refdoc/dragdata.xcp. It’s vert often included in a button to allow drag/drop of that button's action to a target. If you’re just clicking a button then draginfo will be nil, it is usually only populated as part of a drag action.

    Without knowing exactly what your code is doing when the button is clicked, and what data you’re looking to pass, but if you want to know which button is being clicked then you can use <windowcontrol>.getName() - https://www.fantasygrounds.com/refdo...ol.xcp#getName If within the context of the button control (i.e. a <script>function onButtonPress... code) then just getName() can be used.

    General FG dev info: To output the contents of a LUA table for debugging purposes use Debug.console("<description>", <LUA variable1>, <LUA variable2>, <LUA variable3>... );

    Note the comma after the descriptive text - FG will convert the contents of whatever LUA variable is after the comma into a presentable string. For example: Debug.console("Contents of draginfo = ", draginfo);

    This may not help you in your case (it will probably just show "nil") but this is the best way to display none string LUA variables.
    Last edited by Trenloe; May 1st, 2019 at 16:30.

  10. #30
    swbuza's Avatar
    Join Date
    Jan 2017
    Location
    Omaha, Nebraska
    Posts
    220
    Quote Originally Posted by Saeval View Post
    This whole thread reads like the beginning entries of a journal that a scientist would have chronicling his decent into madness in a Cthulhu style game and I love it.
    EXACTLY. It reads just like the journal of Henry Jekyll. Hopefully, Nutter4Ever doesn't become EddieHyde4Ever.


    Ultimate License Holder


    Using:
    Pathfinder Official Core Rules
    Pathfinder Official Advanced Players' Guide
    Pathfinder Official Bestiary 1
    Pathfinder Official Rise of the Runelords Anniversary Ed.


    Currently Running:
    Group 1: Pathfinder, Rise of the Runelords
    Group 2: Pathfinder, Rise of the Runelords

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