PDA

View Full Version : Starship Stuff



Nutter4Ever
April 24th, 2019, 00:42
Looking at fixing up the Starship Combat stuff.

To do list:

Fix HP at the different teirs. It's a minor thing, but it's one of those things that I know is a bug in current ruleset, and "should" be an easy fix.

Add the crew, adapt the starship to the crew.
Add the rules for rolling dice, and applying the effects. Major issue is trying to work out ARCs, these arcs are important, but not sure if there is a way of doing the facing calcuations on the hex-grid (I've previously looked into path tracing calcuations... I got a headache and gave up.) However hopefully have it the GM chooses the ARC which will be hit, then the dice are rolled, and damage applied, whoop, need to make it sticky.
Work out the stuff for applying glitch,wreck and the other status I cannot remember right now.
Then working out an initative tracker, although to be fair I GM this in real life, Engineers do engineering things, pilots roll off, in order pilots do pilot things, scientists do science things, and then gunners do their thing. And the captain interupts when every they want... Need a button for the captain intimiate against the enemy crew that's anothering thing to add to the list... oh wait this is the list. Anyway, this is likely to be the last thing on my list cause I don't feel it's too important/difficult to do without an independant tracker.

Button for recording enemy being intimidated by captains.

Okies, I'm rambling now, I'm going to update this as I go, probably won't make much progress quickly.

If anyone has anything else that needs to be added to this list, then throw in a message and I'll add it to my todo list.

But one thing (and I might have to try and trace down a dev for fantasy grounds) the hit points issue, the increment seems to be based on the frame of the ship, but it's not recorded against the frames currently. So I'm going to have to trace that down the item records for those, expand with a field for increments, but then the frames are behind the core rule book which is password protected. So I'm either going to have to key in a new frame and get that to work... I tried duplicating the Shuttle and it just told me that this feature isn't implemented yet, but it is because dragging in the original worked. But even if I do manage it I might need to get the core rule book updated and/or hacking onto the side of the ruleset... but that might knacker it up if they add a new frame in say an AP like they did in one already... yeah better to get it into the core rule book... even though it's protected.

Okies enough rambling

HP Correct.
Crew roles and rolls.
Damage and Arc.
Crit Damage and effects.
Captain intimidate.
Starship Crew initiative.

Davido1000
April 24th, 2019, 23:20
I wish you good luck on this venture

JohnQPublic
April 24th, 2019, 23:36
Make sure your insurance is up to date! :) Thanks for doing it!

Nutter4Ever
April 25th, 2019, 00:20
Thank you for the well wishes.

Buh, well I started jotting down notes on the the logic side, mainly as I've been at work all day and only just got back from DnD night, so not been able to play around in the code.

Also did some rough thinking on an initative tracker/action sheet. See the traditional style doesn't work becasue each ship get's multiple rolls each round, did think about putting them into crew order top down, but then the captain that can jump in at any moment. and the pilot action/science officer could switch every single round (as long as I'm not the GM cause I loose every single time on initiative.

Also word of warning, if I do get this working it will NOT be pretty, it will be functional. It's not that I don't like pretty and thing function over from, it's because I have limits of my artistic skill is pencil and paper, and I'll probably be able to work out something along the lines of... make it blue!

So without further ado before I forget this again

--Space Combat Initative Tracker--
\/
Ship Name | Setup | Captain | Engineers | Pilot Initiative | Pilot Action | Science Officers | Gunners | Shields | Hull |
Hippocampus | X | O | X | X | X | O | O | 10 / 10 / 10 / 10 | 35 |
Sunrise Maiden | X | X | X X | X | O | | O | 0 / 15 / 10 / 10 | 42 |
__________
Round YY |Next Phase |

So this is just a rough idea, where I might like to end up, its best for me to conceptulise where it's going to end up, so that even when writing in the basics of dice rolls + modifiers, it's each roll is going to need to set a flag that they've acted this round, throw up warning if they've already acted. The double actions of anyone are probably going to be slightly more complicated. And fudge knows what I'm going to do for single pilot craft (see just thought of that now but I need to factor that in for dice rolling).

I'm also not 100% sure I can get some dynamic interfacing going like this because as we can see on the Sunrise Maiden, well I can see it but I should probably explain, once the ships are dragged into the initative tracker, it'll add a line for them.
The first set in space combat every round is actually the setup, incase people decide to switch poitions. After that the \/ moves along the top to indicated which phase your in. So the X means that action has been completed. The setup automatically happens when the GM clicks. After that the icon stays a O until the action is taken, after setup it goes onto Engineering, so I should probably switch Setup and Captain, the captain is outside of the phase ordering because they have "the when ever" clause in their job descriptions.

Then once all the engineers have gone and it's all Xs then the GM hits Next Phase, and so on and so forth until it hits gunners, and then flicks back to Setup, with the round counter YY incrementing.

Need to thing how to signal that the Pilot Action and Science Officers are grouped, into the same phase, but that might just be some funky colouring.

The X are likely to be little green dots, and the O little red dots. Shields and Hull at the end are just counters much like SP/HP on players.

Might included things like TL and AC becasue they are dyamic based on rolls in the round.
Would need to look into how to apply effects and remove them at the top of the round.
Also the whole X X of engineers is another thing I'm not sure if it's possible in FG (so open to suggestions, even if it's just a note of what it's doing else where so I can rip out that code from somewhere else, pull it apart and stick it back together)
Also we can see that this X X of enginners is becasue they've move the science officer into engineering cause something got wrecked... although that's not really clear, so do I have a Weapons / Computers / Engines / Lifesupport / the other thing?, little coloured things, Green/Yellow/Red/Black? to signal the state of them. But yeah, would like to have that all update automagically, and reset the top of each round.

Smeg, I forgot about computers again, those are so frequently forgotten I find, these computers with +1/+1 bonuses here and there, probably want to track those, click on one to use the bonus, and reset them as well at the top of the round. So many things to consider at the top of the round and statuses to restore.

Okies, that's the thoughts of the day. Now off to prep a game of starfinder I'm apparently running in RL tomorrow.

Nutter4Ever
April 25th, 2019, 00:21
Well it knackered my styling cause it doesn't like multiple spaces, but I hope you get the idea.

Saeval
April 25th, 2019, 11:41
As someone with zero coding skills but a heavily invested interest in Starfinder on FG I wish you all the luck and I'm looking forward to seeing the fruits of your labor.

Davido1000
April 25th, 2019, 12:44
Looking at the combat tracker, a simple segmented tracker that automatically fills out who is where and what phase were in and fixing the starship sheet so it works with it would do wonders as a start.

Nutter4Ever
April 26th, 2019, 00:45
Okies, slowly getting my head round how the system works. I probably should of been in bed an hour ago but anyway.

It's crude and not very pretty but I have the incremental HP sorted. I say it's crube because I've not cracked open the Starship frames in items and added a stat for incremental HP.

I think ultimately they'll have to be broken away from the Pre-generated Starships, because they don't need an incremental value.

Anyway, I've done it based on base HP and broke them into groups, and set an incremental HP value.
Then for the teir saved that against the ship, and read that out when calculating HP, and a bunch of IF statements, if it's above 3 then increment = increment + 1, if above 7 then increment = increment + 1... and so on, then add baseHP to incremental HP * increments.

You still need to re-apply the frame of the ship, any time you change the tier.

I've also done some work on the teir entry for less that tier 1.
Previously 0.25 would throw an error as it wasn't in <.25 or >.25.
Previously 0.33 would throw an error as it wasn't in < .33 and > .33
And anything above 20 would throw an error, I've now capped it to 20, if you enter 33 by mistake it will just give you the BP for tier 20.
All I need to do now, is work out how to get it stop erroring when you enter any decimal number above 1. Anyone know LUA for the doing a modulus divide?

And finally for the observant amongst you, you've probably noticed that I mistype tier and teir all the time which throws SO many errors when I first try to run the game.

Still it's "progress", I appreciate this isn't exactly leaps and bounds, but it's

Davido1000
April 26th, 2019, 01:07
you are doing the lord's work

swbuza
April 26th, 2019, 03:07
Awesome!

RoleforFun
April 29th, 2019, 18:26
Don't stop! Please make this happen. I know it's probably a huge pita and headache, but you'll be benefiting sooo many others if you make it work!

Nutter4Ever
April 29th, 2019, 19:13
I'm only human, and well this weekend wasn't good for me. I was tried and so un-motivated on me. I was thinking maybe I'd do some more on this and found I'd only gone and broke the very thing I fixed.

So wasn't a good time for me mentally. Before anyone goes and mentions that this forum is for starfinder not for the pity parties, I'm not after pity just understanding. I have very very low morale, and the slightest thing can cause my mental state to crumble, so when my Starfinder game this saturday just gone failed to start because 1 player was busy with work, 1 player was busy with life and 1 player wasn't feeling too well (I have 4 players and it fails to run the moment one drops, but I don't like running with more than 4 because then it's starts getting unbalances and difficult to make it personal for me.) So yeah there goes the morale, I then spend the rest of the weekend, sulking, eating pizza and wrecking my sleep pattern... Anyway, just want to high-light this:


Don't stop! Please make this happen. I know it's probably a huge pita and headache, but you'll be benefiting sooo many others if you make it work!

I don't know them :-) But damn here I was just watching some Netflix, that pops up in my e-mail... and well I'm back at the keyboard and coding... Update you all laters.

Nutter4Ever
April 29th, 2019, 19:21
Note to self:

Build PILOT AC/TL check increases by ship each time you apply a frame. Probably not a major thing given it can be overridden by user, but it can cause it to creep up on re-applying the frame.

Should that go in the pilot box, isn't that what the for the size box is for?

Answers below?

Nutter4Ever
April 29th, 2019, 20:15
So I broke the HP per teir thing namly in trying to get around decimal issue, I accidentally set ever ship to tier 0, and so increments didn't work again. But I fixed that, and sorted the decimcal issue once and for all, I managed to work out the round down function (LUA might be great for this kinda thing, but it's not something I'm familar with), but with that. once it's above 1, then any amount of decimal will be removed by rounding down. So enter 1.99 and voi-la, it becomes 1. No error and the increment math now holds up.

Sorted CT Threshold. It was being set by frame not by calculation, it's now a strict 1/5 of the total HP (as per RAW)

I think for testing purposes and finding out the next thing that is wrong, I'm going to rebuild a player ship, step by step and deal with any errors that come up. Then I might have to scour the code for all the places it reads "this function doesn't work yet" cause it's not fun trying to trace them down without it at least giving me a line number to reference.

Note to self:

Bug? They have a little box for modifiers per round... adding a computer the usual thing for modifiers per round checks, doesn't add anything to this box.

Hmm, might suppress the PCU overload warning. Just so you know, it's not uncommon for ships (even by Paizo) to have PCU way over the Power Core limit. As a GM I've rationalised this as you don't have the drift drive on all the time, also you have to turn off the thrusters before jumping. So you can flicker things on and off, and would power down things enough to get enough PCU for the drift drive to pierce the veil and get you into the drift, turn it off while in there, and turning it back on to get back to the material plane once your done traversing the drift.

But it does make me wonder it should be giving the current amount minus the drift drive so you can tell when it's well and truely overloading the PCU.

Hmm future idea, like in video games, have a screen for power routing configurations, combat/travel/drift and you can flick on and off stuff and it gives you load ratings. Anyway, until it becomes a major concern of the rules, that'll be on the back burner as a nice idea, but meh... more important things.

Still everything else about the ship building seems to work. Shout out your bugs if anything doesn't seem to work as they should.

On to one of the bits you've all be waiting for... the Dice rolls, and for that we need crew.

Start with the pilot! We shall call him Bob. Bob has 1 rank and a bonus of 11 (according to the book, damn Bob). Check the DCs!

Well the DCs are wrong... and oh my, I was hoping to find something there, but it just forced out early. And there was just some really buggy code there. But nope oh my, it's:


function action(draginfo)

local sMsg = Interface.getString("charstarship_message_notimplemented");
ChatManager.SystemMessage(sMsg, true);


-- if sSkill then
-- local nodeChar = window.getDatabaseNode();
-- local rActor = ActorManager.getActor("pc", nodeChar);
-- local nValue = CharManager.getSkillValue(rActor, sSkill);
-- ActionSkill.performRoll(draginfo, rActor, sSkill, nValue);
-- end
end

now for those that don't code.

Function Action (draginfo) <- This is the line called from somewhere (I'd be lying if I could tell you where, still learning)

local sMsg = Interface.getString("charstarship_message_notimplemented"); <- this line sets up a variable, an bit of computer memory, and then set's it to the geneic message which we're all seeing as "This functinoality is not enabled at present. Functionality will be enabled in a future update."

ChatManager.SystemMessage(sMsg, true); <- this line then takes that variable called sMsg, and sends it to the chat management system to give you the message on screen, I've been using this for debugging, I added anothe mesage after this line for a stright up, "You've found it", to make sure I was looking in the right place.

-- if sSkill then
-- local nodeChar = window.getDatabaseNode();
-- local rActor = ActorManager.getActor("pc", nodeChar);
-- local nValue = CharManager.getSkillValue(rActor, sSkill);
-- ActionSkill.performRoll(draginfo, rActor, sSkill, nValue);
-- end

These lines all start with the --, which means everything aftwards becomes a comment, non-executed code. So does nothing, but gives me some insight into what MAY be useful to get further with all this, I'm going to uncomment them and write them out to the screen and see what it throws up.

And finally

end <- this line tells the program it's the end of the function and it can go back to the rest of the main code... again lying if I knew what that was.

Okies, that's rough, but I'll contining to work on it, one thing I do note, is that it's always got the skill as "Piloting", I know as per RAW that's the case, but if it's the same for weapons, there is an option to not use your ranged attack, but you can use piloting instead and further starship modules that allow you to sub-in your Mystisim skill, so that might need tweaking...

And bug: The DC's are wrong!

Alright, time for more coffee.

Nutter4Ever
April 29th, 2019, 22:07
So much cross-referencing.
So much searching.
So much debug messages.
So much reloading.

This is why I don't like un-typed languages.

I've acutally found the section of the code that handles skill checks, because for some reason it's flagging up my rolls as untrained, Bob, as we have established is the pilot, and to get that going, at least somewhere in the general direction of making sense of it, I've got it to a "Piloting" roll for all the button,... including firing the cannons, but I'm working on it :-P

Anyway, as Bob is the pilot it was flagging as untrained, I've since trained him. He's an Android, Ace Pilot, Operative... Class-Skill is checked... and it's coming up with untrained still. So I've had to do some digging and found that Bob is at least recognised as a pc, because he has a .sType of "pc" great stuff... but what I don't know looking at it, is how a PC is defined in the stucture.

It could be defined as

.rSkills
.rSkill
.rAbilties (unlikely as abilities tend to be defined as class abilites not skills) but I don't know what I'm looking up because he's just an rActor, but without type rActor could literally be a number, a string or a pumpernickle. It makes it a very adaptable language, but until I can find the definition of what it is to be an rActor then I don't know where the skills are located.

Anyway programmer rant over, back to trying to find something to help.

Nutter4Ever
April 29th, 2019, 22:20
ah wait, rActor turns out not to be a PC... found out his name and it's Audacious Gambit, randomly tried printing out rActor.sName.

So it's not grabbed the crew member, it's grabbed the action and called it a crew member... I think. Okies, now to try and work out if I can grab the parent of the action and hopefully that's the PC, time to delve into the XML files for insight.

Davido1000
April 29th, 2019, 23:02
I'm only human, and well this weekend wasn't good for me. I was tried and so un-motivated on me. I was thinking maybe I'd do some more on this and found I'd only gone and broke the very thing I fixed.

So wasn't a good time for me mentally. Before anyone goes and mentions that this forum is for starfinder not for the pity parties, I'm not after pity just understanding. I have very very low morale, and the slightest thing can cause my mental state to crumble, so when my Starfinder game this saturday just gone failed to start because 1 player was busy with work, 1 player was busy with life and 1 player wasn't feeling too well (I have 4 players and it fails to run the moment one drops, but I don't like running with more than 4 because then it's starts getting unbalances and difficult to make it personal for me.) So yeah there goes the morale, I then spend the rest of the weekend, sulking, eating pizza and wrecking my sleep pattern... Anyway, just want to high-light this:



I don't know them :-) But damn here I was just watching some Netflix, that pops up in my e-mail... and well I'm back at the keyboard and coding... Update you all laters.

I know that feel about games failing to start bud. don't put unneeded pressure on yourself, your not getting paid by anyone and your doing everyone a service for even trying to attempt this.

Octavious
April 30th, 2019, 00:29
Hmm, might suppress the PCU overload warning. Just so you know, it's not uncommon for ships (even by Paizo) to have PCU way over the Power Core limit. As a GM I've rationalised this as you don't have the drift drive on all the time, also you have to turn off the thrusters before jumping. So you can flicker things on and off, and would power down things enough to get enough PCU for the drift drive to pierce the veil and get you into the drift, turn it off while in there, and turning it back on to get back to the material plane once your done traversing the drift.

But it does make me wonder it should be giving the current amount minus the drift drive so you can tell when it's well and truely overloading the PCU.

Hmm future idea, like in video games, have a screen for power routing configurations, combat/travel/drift and you can flick on and off stuff and it gives you load ratings. Anyway, until it becomes a major concern of the rules, that'll be on the back burner as a nice idea, but meh... more important things..

I incorporated something called an "Engineers Power Report" in Starship Design Studio.. something you may think about what your talking about. What it does is calculate if you don't have enough PCU to enter the drift. A dialog is brought up with everything you have built into the ship that requires PCU's It lists them with a check box and the PCU that component draws. You then check what you want to shut off.. when you do it recalcs and shows how much more you need to turn off. once this has been calculated and the ship is compiled to a FG module.. all the items you picked are placed into the ship sheet for your engineer to turn off when you enter the drift. Normally just turning off the thrusts frees enough PCU but some configurations may not be enough..

since your talking about this... this may work for you to add to your roject

Nutter4Ever
April 30th, 2019, 00:40
Thanks Octavious, I will see what I can do once I've gotten the basics sorted out for starship combat.

Update before I head for bed... I've managed to get the PC name who is making the roll, I can get out the skill check required, and I can get the name of the action... now I just need to figure out how to get the character sheet based off the name for the Skill check...

Although just found this node in the DB...

<link type="windowreference">
<class>charsheet</class>
<recordname>charsheet.id-00001</recordname>
</link>

I think that might be what I need, but it's an hour after I should of been in bed, so that is a job for tomorrow. See ya all tomorrow.

swbuza
April 30th, 2019, 02:50
This is awesome.

Nutter4Ever
April 30th, 2019, 20:41
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.

Trenloe
April 30th, 2019, 21:09
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/refdoc/databasenode.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).

Nutter4Ever
April 30th, 2019, 21:21
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? :-)

Trenloe
April 30th, 2019, 21:35
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.

Nutter4Ever
April 30th, 2019, 21:45
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.

Saeval
April 30th, 2019, 22:40
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!

UltimateGM
May 1st, 2019, 02:35
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.

Nutter4Ever
May 1st, 2019, 07:37
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.

Trenloe
May 1st, 2019, 14:47
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/refdoc/windowcontrol.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.

swbuza
May 1st, 2019, 15:26
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.

EbbCubed
May 31st, 2019, 05:30
Hey, how have things been going on the ship tracker? I only recently picked up the SF book and found out about the issues with ship combat and saw you were making some good progress on a fix. How has that been going? Did you take a break or is it still being worked on?

Nutter4Ever
June 16th, 2019, 00:46
Sorry for the radio silence, it's gotten to a crunch time at work. I've not made any further progress on this. And unfortautly my next project at work will have me learning yet another programming language. Not LUA so my head will be mash and peas for a while until I get that sorted out.

I do endeavour to resume working on this when time allows, but for the moment it's on a hiatus sorry folks.

EbbCubed
June 16th, 2019, 01:09
All good Nutter, gotta focus on life first. We can wait in the meanwhile. I just saw your thread and was curious to know what happened with the project. ^^

Kibri_Oakbright
June 18th, 2019, 22:25
Nutter4ever - so awesome to see you working on this in your spare time. the SF community I am sure appreciates all your efforts as well as those supporting you in various ways.

Shame on Smiteworks for not resolving the entire ship combat issue along time ago. Yes, I know of some of the road blocks, but ship combat should have been re-tackled long ago.

Nutter4Ever
June 19th, 2019, 00:02
Road blocks aside, I actually defend their position. I'm using the term ghosting, following, for they left without finishing the job, I pass neither judgement nor blame on them for their reasons, just stating facts.

1. They hired a guy to do it, he ghosted.
2. They contracted a guy to do it, he ghosted.

And while hopefully they are making a profit out of the Starfinder Licence, so they continue with production on the Adventure Paths and future rule books, I've seen a post some where that states they lost a fair chunk of their whole Starfinder licenced products on contracting that second guy. And while they don't have an ideal situation at the moment. Compared to other VTT products they have some of the highest degree of automation for starship combat as it stands. Yes it could be better, but I run two campagins on Fantasy Grounds including starship combat, and all I have to do is pull out my trusty piece of pen and paper and jot notes and just get skill check rolls on Fantasy Grounds and do the checking, shield points and hull points, critical threasholds manually. And I would much love to see other improvements in the starship combat. I can see scope for improvement all around the Starfinder rule set which would make a majority of my time on Fantasy Grounds alot smoother. Here's a list just for fun:

Buttons for skill checks against targetted enemies, which could include, culture checks where it reveals what it's calculated it should to the PC, but also when they want to intimidate, move thru the space, move around the space.
Buttons for the operative trick attack, so you don't have to manually remember that it's 20 + CR, and if it's a success apply flat-footed to the target, and then flat-footed for the round if the attack hits when the player reaches that certain level.
Better automation for damage calculation, I have a solarian who we are always having to reculate because they get so many bonuses from here there and everywhere that we for gets. +1 for attunement, + CHA mod for that sweet Fusion, +1d4 for that crystal, + what ever damage it is for the level of the solarian, + STR mod... I think that covers it.
How about a mood tracker for NPCs so you the GM don't have to work out how the players are supposed to go up and down the tracks for diplomacy on NPCs getting them to friendly status?
Vehicular/Chase mechanics/combat, cause that's not really tracked as far as I've seen, and that kind applies to more than one system, yes I suppose unless the system is really really built for it then it's not really part of any system, but chase mechanics are in pathfinder, starfinder and DnD. But I never really see that brought up.

And that's it off the top of my head, my wishlist, but for now when I get the chance I'll be going back to starship combat, not because I feel it's the most important thing to work on, but because I think I have a chance to finish it before they do :-) And who knows, they might be able to get all the stuff above and in there.

Finally, another point of interest, is if you go searching around other forums, facebook groups and general store chatter for Starship combat in Starfinder, there is a considerable fraction of people, that don't like the starship combat and have house ruled it so that it bears no resembalance for the RAW of it. While I don't agree with them, Smiteworks has to consider the profit of the project, the added quality of life, and the usefulness of the endevour, and in all honesty, what we've got here is already alot better than what you have sat round a table with pen and paper. So yeah, I don't see Smiteworks getting round to this any time soon, I hope that Smiteworks gets around to this before too long.

LightBringer
June 19th, 2019, 01:01
Well, the Starship combat automation should be a priority one as Starfinder is a space RPG. Not arguing about the motivations that are holding the development back, just stating that it's a major flaw at the moment. I really hope this will be sorted out and not in 2022.

Samarex
June 19th, 2019, 22:45
Nutter, your 1/2 right. There were three people assigned to the Starfinder ruleset. They primary Developer, AP Converter and myself. I was assigned creating the source books and helping with the ruleset. I did most of the PC record sheet and automation for it and all the source books.
The AP developer has done a great job with keeoing them current, and I have tried to fix bugs that I can as they pop up. Im in the same boat as you with LUA I am learning it.
I have not as you put it ghosted, there has just been alot of life stuff thats taken up my time, but I am starting to look at some of the issues and see if I can tackle some Starship stuff

Kumusta
Samarex.

goodmanje
June 20th, 2019, 01:15
You've done an excellent job.

Octavious
June 20th, 2019, 18:57
Finally, another point of interest, is if you go searching around other forums, facebook groups and general store chatter for Starship combat in Starfinder, there is a considerable fraction of people, that don't like the starship combat and have house ruled it so that it bears no resembalance for the RAW of it. While I don't agree with them, Smiteworks has to consider the profit of the project, the added quality of life, and the usefulness of the endevour, and in all honesty, what we've got here is already alot better than what you have sat round a table with pen and paper. So yeah, I don't see Smiteworks getting round to this any time soon, I hope that Smiteworks gets around to this before too long.

I am coding a combat tracker in C# at present time.. it is only for the GM to help automate the starship combat .. this will make the starship combat a more enjoyable play.. can be used by VTT and pen and paper.. ill have it done in a few months and a video on release and where to download it.. I wont need any permissions to release this so its a guarantee to be released. eventually I may include a networking code and supply a PC tracker but anytime soon..

in any case you will be able to breeze thru ship combat pretty easily.. so even if FG gets the tracker working .. this can be an aid to pen and paper ppl.

Samarex
June 20th, 2019, 20:46
Im going to give it a shot. There are a few things I want to change on the Ship sheet, maimly the combat tab, I want them all to be mini windows so if your the Pilot you can ooen the Pilot mini window and you will have everything you need,. You will be able to close the ship sheet and do your combat.

I think most of the complaints are due to the fact that the stuff is alll there on the ship sheet but most of it does nothing. And there are bugs in what is there and suspose to work.

But I going to dig in and see If I can do it.

Samarex

Kibri_Oakbright
June 21st, 2019, 09:28
Samarex - I would agree from my groups perspectives, that the frustration is most things that can be automated for ship combat appear to be there but they do nothing. I think the ideas you posted above sound awesome and more efficient and understandable for players as well. thnx for taking this on.

I am semi-retired, have time to kill, so let me know if I can assist you in anyway in your efforts.

Samarex
June 21st, 2019, 23:50
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.

As a note, you can open a second instance of FG and join your game so you can do testing.
I do this alot as stuff works diffwrent between Host and Client. Sometimes things in my Character sheet work perfect in Host but have problwms when connected as Client.
So make sure you test both ways.

Samarex
July 16th, 2019, 02:33
Okies, slowly getting my head round how the system works. I probably should of been in bed an hour ago but anyway.

It's crude and not very pretty but I have the incremental HP sorted. I say it's crube because I've not cracked open the Starship frames in items and added a stat for incremental HP.

I think ultimately they'll have to be broken away from the Pre-generated Starships, because they don't need an incremental value.

Anyway, I've done it based on base HP and broke them into groups, and set an incremental HP value.
Then for the teir saved that against the ship, and read that out when calculating HP, and a bunch of IF statements, if it's above 3 then increment = increment + 1, if above 7 then increment = increment + 1... and so on, then add baseHP to incremental HP * increments.

You still need to re-apply the frame of the ship, any time you change the tier.

I've also done some work on the teir entry for less that tier 1.
Previously 0.25 would throw an error as it wasn't in <.25 or >.25.
Previously 0.33 would throw an error as it wasn't in < .33 and > .33
And anything above 20 would throw an error, I've now capped it to 20, if you enter 33 by mistake it will just give you the BP for tier 20.
All I need to do now, is work out how to get it stop erroring when you enter any decimal number above 1. Anyone know LUA for the doing a modulus divide?

And finally for the observant amongst you, you've probably noticed that I mistype tier and teir all the time which throws SO many errors when I first try to run the game.

Still it's "progress", I appreciate this isn't exactly leaps and bounds, but it's

For Dividing.
local nLight = math.floor( nStrength / 2); For rounding down
local nLight = math.ceil( nStrength / 2); For Rounding up