US making a character generator?

Suggestions or feature requests for the dice roller, forums, or PbP games.
Message
Author
User avatar
GreyWolfVT
Wants a special title like Scott
Posts: 33052
Joined: Wed Oct 30, 2013 10:02 pm
Location: Vermont
Contact:

Re: US making a character generator?

#61 Post by GreyWolfVT »

Nice reference Lance I used the same site to try and figure out the image for the background as it wasn't "filling the page" it was by default making tiles of the image.

ToniXX no problem removing the image I was just trying to match the roller and forums since they all had nice old school fantasy art in a banner.

The parchment image does fill the page on a computer or at least the windows computers I've been using. Son not sure what was meant by fixing that, unless it was the old image i wanted to use. But that too was working to fill the screen of the page that was all in the css file.
“All men did have darkness. Some wore it in the form of horns. Some bore it invisibly as rot in their souls.”
― Paul S. Kemp, Shadowbred
"If good people won’t do the hard things, evil people will always win, because evil people will do anything."
― Paul S. Kemp, Twilight Falling

Algrim Tirion Dwarf - HarnMaser
Dalin Silverhand Dwarf Thief - Barrowmaze
Elwood 'Dug' The Bounty Hunter Dwarf Swashbuckler - Hedge's Adventures in the World of Golarion
Roan Gravelbeard Dwarf Fighter - Hedge's Greyhawk Adventures
Torvik Shadowhood Dwarf Fighter/Thief - Nocturne
DM - GreyWolf's Mystara Adventures - AD&D 2e

User avatar
Leitz
Rider of Rohan
Rider of Rohan
Posts: 5160
Joined: Wed Sep 13, 2017 8:38 pm

Re: US making a character generator?

#62 Post by Leitz »

Lance, thanks for the pointer. I use that site too, but last night I stayed up way past my nappy time. I've made the change, and the form is now in "lib/form.html". I've also started the unit tests and moved things around a little, so the base directory is cleaner.

ToniXX, I also realized, the hard way, that we're using PHP 7+, correct? I tried a PHP 5 box (CentOS 7), but the random_int() method wasn't available. Happy to go with PHP 7 or 8, as long as the end host supports it. Lemme know.

User avatar
ToniXX
Site Admin
Site Admin
Posts: 3225
Joined: Sat Sep 19, 2009 5:21 pm
Location: Long Beach, CA

Re: US making a character generator?

#63 Post by ToniXX »

Yes the host has php 7+.
"Sir, our research shows that the bird is equal to or greater than the word."

User avatar
GreyWolfVT
Wants a special title like Scott
Posts: 33052
Joined: Wed Oct 30, 2013 10:02 pm
Location: Vermont
Contact:

Re: US making a character generator?

#64 Post by GreyWolfVT »

Making it look prettier front end side only thing I can think of doing is adding graphics style buttons but that would require "borrowing" from other places or someone with some graphics design skills. Unless someone has some other ideas that I can work with html & css side. Maybe making the fields look a little like a character sheet or something?
“All men did have darkness. Some wore it in the form of horns. Some bore it invisibly as rot in their souls.”
― Paul S. Kemp, Shadowbred
"If good people won’t do the hard things, evil people will always win, because evil people will do anything."
― Paul S. Kemp, Twilight Falling

Algrim Tirion Dwarf - HarnMaser
Dalin Silverhand Dwarf Thief - Barrowmaze
Elwood 'Dug' The Bounty Hunter Dwarf Swashbuckler - Hedge's Adventures in the World of Golarion
Roan Gravelbeard Dwarf Fighter - Hedge's Greyhawk Adventures
Torvik Shadowhood Dwarf Fighter/Thief - Nocturne
DM - GreyWolf's Mystara Adventures - AD&D 2e

User avatar
Leitz
Rider of Rohan
Rider of Rohan
Posts: 5160
Joined: Wed Sep 13, 2017 8:38 pm

Re: US making a character generator?

#65 Post by Leitz »

GreyWolfVT wrote: Sat Jun 12, 2021 1:10 am Making it look prettier front end side only thing I can think of doing is adding graphics style buttons but that would require "borrowing" from other places or someone with some graphics design skills. Unless someone has some other ideas that I can work with html & css side. Maybe making the fields look a little like a character sheet or something?
Can you do a simple character sheet layout? What I'm doing right now just puts the infomation at the top of the page. That's going to have issues as we add more data to the character.

Found a bug based on the use of both $prefs and $mins. In AD&D 1e there were just a few minimums, OSRIC seems to have everything as a minimum. So I need to get rid of prefs, or link it directly to $mins.

User avatar
GreyWolfVT
Wants a special title like Scott
Posts: 33052
Joined: Wed Oct 30, 2013 10:02 pm
Location: Vermont
Contact:

Re: US making a character generator?

#66 Post by GreyWolfVT »

Leitz wrote: Sat Jun 12, 2021 1:33 am Can you do a simple character sheet layout? What I'm doing right now just puts the information at the top of the page. That's going to have issues as we add more data to the character.
I can take a look at how the roller sheet pages are coded and maybe figure something out.
“All men did have darkness. Some wore it in the form of horns. Some bore it invisibly as rot in their souls.”
― Paul S. Kemp, Shadowbred
"If good people won’t do the hard things, evil people will always win, because evil people will do anything."
― Paul S. Kemp, Twilight Falling

Algrim Tirion Dwarf - HarnMaser
Dalin Silverhand Dwarf Thief - Barrowmaze
Elwood 'Dug' The Bounty Hunter Dwarf Swashbuckler - Hedge's Adventures in the World of Golarion
Roan Gravelbeard Dwarf Fighter - Hedge's Greyhawk Adventures
Torvik Shadowhood Dwarf Fighter/Thief - Nocturne
DM - GreyWolf's Mystara Adventures - AD&D 2e

User avatar
Leitz
Rider of Rohan
Rider of Rohan
Posts: 5160
Joined: Wed Sep 13, 2017 8:38 pm

Re: US making a character generator?

#67 Post by Leitz »

I'll be getting back to coding this weekend. If anyone has a desire to contribute, there are a few easy places to help: Remember, cut and paste is your friend. For some of us, "2yyp". :) I think GreyWolfVT is working on a basic character sheet that we can embed in the form. That'll be cool.

User avatar
Lance
Ranger
Ranger
Posts: 747
Joined: Thu Feb 13, 2020 8:20 am
Location: Budapest, Hungary, Europe
Contact:

Re: US making a character generator?

#68 Post by Lance »

I'm still interested but I'm struggling to find the time. :/

User avatar
GreyWolfVT
Wants a special title like Scott
Posts: 33052
Joined: Wed Oct 30, 2013 10:02 pm
Location: Vermont
Contact:

Re: US making a character generator?

#69 Post by GreyWolfVT »

I'm hoping to find a way to do that and may have to "borrow" some javascript and what not in the code on the roller. I just haven't taken the time or had the time to do so yet.
“All men did have darkness. Some wore it in the form of horns. Some bore it invisibly as rot in their souls.”
― Paul S. Kemp, Shadowbred
"If good people won’t do the hard things, evil people will always win, because evil people will do anything."
― Paul S. Kemp, Twilight Falling

Algrim Tirion Dwarf - HarnMaser
Dalin Silverhand Dwarf Thief - Barrowmaze
Elwood 'Dug' The Bounty Hunter Dwarf Swashbuckler - Hedge's Adventures in the World of Golarion
Roan Gravelbeard Dwarf Fighter - Hedge's Greyhawk Adventures
Torvik Shadowhood Dwarf Fighter/Thief - Nocturne
DM - GreyWolf's Mystara Adventures - AD&D 2e

User avatar
Leitz
Rider of Rohan
Rider of Rohan
Posts: 5160
Joined: Wed Sep 13, 2017 8:38 pm

Re: US making a character generator?

#70 Post by Leitz »

GreyWolfVT wrote: Thu Jun 17, 2021 9:14 pm I'm hoping to find a way to do that and may have to "borrow" some javascript and what not in the code on the roller. I just haven't taken the time or had the time to do so yet.
Do the best you can, but don't stress over it. We're doing the functional work, ToniXX will do the final integration with the USS code.

I appreciate you taking this on!

User avatar
Leitz
Rider of Rohan
Rider of Rohan
Posts: 5160
Joined: Wed Sep 13, 2017 8:38 pm

Re: US making a character generator?

#71 Post by Leitz »

Added all the classes, and their minimums. I really need to figure out how to programatically sort preferences. Maybe a hash-y type thing.

User avatar
Lance
Ranger
Ranger
Posts: 747
Joined: Thu Feb 13, 2020 8:20 am
Location: Budapest, Hungary, Europe
Contact:

Re: US making a character generator?

#72 Post by Lance »

Why do you need to sort preferences, don't they retain their order?

User avatar
Leitz
Rider of Rohan
Rider of Rohan
Posts: 5160
Joined: Wed Sep 13, 2017 8:38 pm

Re: US making a character generator?

#73 Post by Leitz »

Lance wrote: Sun Jun 20, 2021 12:12 pm Why do you need to sort preferences, don't they retain their order?
Currently, six 3d6 rolls are put into an array, and then sorted low to high. The $prefs was designed to take the highest rolls and assign them to the stats with the highest requirements. So a Paladin's highest roll would go to Charisma, next highest to Wisdom, then Strength, etc. That way, if the rolls were not sufficient, the upgrade to class minimums made the least amount of change necessary.

However, OSRIC has a bunch of class minimums. Really. Out of fifty-four possibilities, only three do not have a mimimum! That's with nine classes and six stats.

The current plan is to build $mins, and then build $prefs from that. Otherwise we have to maintain two seperate files for what the stats should be.

I made a new branch, "auto_prefs", and have set up tests for each class. This afternoon I'll work on the $mins and $prefs issue. Unless my Sunday afternoon nap goes real long. :)

https://github.com/TheUnseenServant/uss ... refs/tests

User avatar
Leitz
Rider of Rohan
Rider of Rohan
Posts: 5160
Joined: Wed Sep 13, 2017 8:38 pm

Re: US making a character generator?

#74 Post by Leitz »

The new code passes the tests and automatically generates preferences based on class minimums. Feel free to review the code and let me know if there are issues, or if something isn't clear.

User avatar
GreyWolfVT
Wants a special title like Scott
Posts: 33052
Joined: Wed Oct 30, 2013 10:02 pm
Location: Vermont
Contact:

Re: US making a character generator?

#75 Post by GreyWolfVT »

Sorry I haven't taken the time to review any more of the code to try and character sheet up the generator.
“All men did have darkness. Some wore it in the form of horns. Some bore it invisibly as rot in their souls.”
― Paul S. Kemp, Shadowbred
"If good people won’t do the hard things, evil people will always win, because evil people will do anything."
― Paul S. Kemp, Twilight Falling

Algrim Tirion Dwarf - HarnMaser
Dalin Silverhand Dwarf Thief - Barrowmaze
Elwood 'Dug' The Bounty Hunter Dwarf Swashbuckler - Hedge's Adventures in the World of Golarion
Roan Gravelbeard Dwarf Fighter - Hedge's Greyhawk Adventures
Torvik Shadowhood Dwarf Fighter/Thief - Nocturne
DM - GreyWolf's Mystara Adventures - AD&D 2e

User avatar
Leitz
Rider of Rohan
Rider of Rohan
Posts: 5160
Joined: Wed Sep 13, 2017 8:38 pm

Re: US making a character generator?

#76 Post by Leitz »

No worries. We are all doing a bit at a time, and every step forward helps.

User avatar
Leitz
Rider of Rohan
Rider of Rohan
Posts: 5160
Joined: Wed Sep 13, 2017 8:38 pm

Re: US making a character generator?

#77 Post by Leitz »

Looking for some discussion before moving forward. Currently, the file mins.php holds minimum stats for classes. Soon we'll need mandated alignments, restricted races, etc. That's either one large file for each data structure, one file for each "thing" (alignment.php, races.php), or move to a class for each, uh, class, and put things in there.

Thoughts?

User avatar
Lance
Ranger
Ranger
Posts: 747
Joined: Thu Feb 13, 2020 8:20 am
Location: Budapest, Hungary, Europe
Contact:

Re: US making a character generator?

#78 Post by Lance »

IMHO, an elegant solution would be a matrix with rows as classes and columns as races, containing true if the combination is allowed. We could use the first row/column for readable identification. We could do the same with alignment (to races have alignment restrictions?).

User avatar
ToniXX
Site Admin
Site Admin
Posts: 3225
Joined: Sat Sep 19, 2009 5:21 pm
Location: Long Beach, CA

Re: US making a character generator?

#79 Post by ToniXX »

Leitz wrote: Sun Jun 27, 2021 9:44 pm Looking for some discussion before moving forward. Currently, the file mins.php holds minimum stats for classes. Soon we'll need mandated alignments, restricted races, etc. That's either one large file for each data structure, one file for each "thing" (alignment.php, races.php), or move to a class for each, uh, class, and put things in there.

Thoughts?
I like the idea of making one file for each 'thing'. That seems to be how you've got it set up now and I like how it works.
"Sir, our research shows that the bird is equal to or greater than the word."

User avatar
Leitz
Rider of Rohan
Rider of Rohan
Posts: 5160
Joined: Wed Sep 13, 2017 8:38 pm

Re: US making a character generator?

#80 Post by Leitz »

I've pushed up code to allow setting the alignment, and modified the form layout so that it's visible without scrolling down. If a disallowed alignment is chosen, the alignment is randomly set to something appropriate.

Post Reply

Return to “Suggestions”