PDA

View Full Version : Help creating some custom windows for The Sprawl



Acofis
October 25th, 2022, 20:46
Hello All!

I am Software Engineer by trade attempting to start a game of The Sprawl with some experienced D&D players. Sine the group is experienced in RPG games and the system for the Sprawl and PbtA are relatively simple I thought this was a good time to try and actually use the ultimate license I have and run a game.

The problem:

I have rolls and mods and a lot of other stuff I crafted from referencing the great Dungeon World setup tutorial by @wndrngdru, however, when it comes to Corps, Threats, and Countdown Clocks I am at a bit of a loss for best implementations.

What I have:

I am currently using the Worldbuilder features of type Group (Corp) and Entity (Threat) with the data I care about in some field that make personal sense to me even if they are named oddly. Then I am tossing roll links in the gm description and an image of the current Countdown Clock status at the top as seen here 54861

I also have a set of colorized countdown clocks that are setup in a table 54862

What I would like:

A custom window that looks like 54863

where the Countdown clock at the top is a field that does one of the following:

a) Shows the currently linked countdown clock image and, on click, cycles through the clock images.
b) Shows the currently linked countdown clock image and, when a new image is dragged in replaces the image shown with the one dragged on
c) Stores the value for the current status of this Corps clock which is looked up in the table which can be dragged in somewhere and shows the image for the Clock in the table that matches

The other fields are just private string/link fields and I think I can handle that myself based on the tutorials


Why I want this and a Bonus feature!:

The main reason I want this is to lead to be bigger goal of updating the combat tracker to also use the Table of Countdown Clocks. Since player health in The Sprawl is represented by a countdown clock also it would be great use one everywhere health is discussed also. At the very least I would like to correlate a health value to the table and show the corresponding clock in the combat tracker for the each player based on current health

I have already watched the tutorial series most of the way through and it has helped with an understanding of some of the architecture in place but I am not sure if what I want is possible and if there is some better or similar option that is more in line with the architecture. I am also unsure if it is better to start from scratch with a new window or mod some other existing one I may not know about at this point.

Thanks in advance for any assistance!
Acofis

damned
October 26th, 2022, 00:09
Welcome Acofis

For player health my guess is you would use an IconCycler. maybe you manually apply damage to minimise coding.
I did something a long time ago for City of Mist that might be usable.

I really didnt follow the rest of the Clock discussion.
I did also make some BitD clocks at one point but I never really progressed it too far...
And they were old school clocks :)

Acofis
October 26th, 2022, 16:13
Welcome Acofis

For player health my guess is you would use an IconCycler. maybe you manually apply damage to minimise coding.
I did something a long time ago for City of Mist that might be usable.

I really didnt follow the rest of the Clock discussion.
I did also make some BitD clocks at one point but I never really progressed it too far...
And they were old school clocks :)

Thank you for the fast reply!

I will check for some examples of the IconCycler and confirm it's use.

As for the broader Clocks discussion, to clarify, I really just want to see one of my clock instances in the field as an actual image rather than a link on the Worl Builder window.

It sounds like the iconscycler may be the solution for both though so I will look into this.

1. I have seen the info website for morecore and the videos... is there anywhere else to see documentation on what tags can be used and how they interact?

2. Also. I have seen in a few spots of your video that you mention removing some fields from the charsheet_more to make room but I did not see an example of how. If I were to make a charsheet_more with a merge=join and then take the fields I wanted and make their merge=replace but leave them empty will that remove them or is there some better/other way?

3. I am attempting to add a new window of my own which is a simplified copy of the worldbuilder window. I was wondering how to go about making it available in the game. I am currently using LibraryData.overrideRecordTypes() to add my new type to the DB and it shows up in the desktop sidebar but only with the generic icon and no text on the button to open it. I am wondering how to add the icon and text for this list entry and if this is the right path to adding a new feature?

Acofis
October 27th, 2022, 20:11
Thank you for the fast reply!

I will check for some examples of the IconCycler and confirm it's use.

As for the broader Clocks discussion, to clarify, I really just want to see one of my clock instances in the field as an actual image rather than a link on the Worl Builder window.

It sounds like the iconscycler may be the solution for both though so I will look into this.

1. I have seen the info website for morecore and the videos... is there anywhere else to see documentation on what tags can be used and how they interact?

2. Also. I have seen in a few spots of your video that you mention removing some fields from the charsheet_more to make room but I did not see an example of how. If I were to make a charsheet_more with a merge=join and then take the fields I wanted and make their merge=replace but leave them empty will that remove them or is there some better/other way?

3. I am attempting to add a new window of my own which is a simplified copy of the worldbuilder window. I was wondering how to go about making it available in the game. I am currently using LibraryData.overrideRecordTypes() to add my new type to the DB and it shows up in the desktop sidebar but only with the generic icon and no text on the button to open it. I am wondering how to add the icon and text for this list entry and if this is the right path to adding a new feature?

I have since discovered part of the answers to #3
#3 - the reference I was using did not have all of the fields in the new record. I see now that there is a field for display Icon in the record and can add it with my other lua script. When I attempted this I did not see a change in the look of the element I had added so not quite sure what is going wrong there.

Acofis
October 28th, 2022, 18:06
This can be closed now.

I have learned a bit since writing and have made some more educated enquiries in this thread for the developer tutorial (https://www.fantasygrounds.com/forums/showthread.php?46553-MoreCore-Coding-Tutorials&p=666887&viewfull=1#post666887) since that is roughly what I am following.

Thank you!