US making a character generator?
- 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?
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.
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
DM - GreyWolf's Mystara Adventures - AD&D 2e
― 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
Re: US making a character generator?
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.
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.
Re: US making a character generator?
Yes the host has php 7+.
"Sir, our research shows that the bird is equal to or greater than the word."
- 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?
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
DM - GreyWolf's Mystara Adventures - AD&D 2e
― 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
Re: US making a character generator?
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.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?
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.
- 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?
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
DM - GreyWolf's Mystara Adventures - AD&D 2e
― 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
Re: US making a character generator?
I'll be getting back to coding this weekend. If anyone has a desire to contribute, there are a few easy places to help:
- Expand class minimum stats
- Expand the name options
- Expand the various options
- Lance
- Ranger
- Posts: 747
- Joined: Thu Feb 13, 2020 8:20 am
- Location: Budapest, Hungary, Europe
- Contact:
Re: US making a character generator?
I'm still interested but I'm struggling to find the time. :/
- 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?
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
DM - GreyWolf's Mystara Adventures - AD&D 2e
― 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
Re: US making a character generator?
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.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.
I appreciate you taking this on!
Re: US making a character generator?
Added all the classes, and their minimums. I really need to figure out how to programatically sort preferences. Maybe a hash-y type thing.
- Lance
- Ranger
- Posts: 747
- Joined: Thu Feb 13, 2020 8:20 am
- Location: Budapest, Hungary, Europe
- Contact:
Re: US making a character generator?
Why do you need to sort preferences, don't they retain their order?
Re: US making a character generator?
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
Re: US making a character generator?
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.
- 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?
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
DM - GreyWolf's Mystara Adventures - AD&D 2e
― 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
Re: US making a character generator?
No worries. We are all doing a bit at a time, and every step forward helps.
Re: US making a character generator?
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?
Thoughts?
- Lance
- Ranger
- Posts: 747
- Joined: Thu Feb 13, 2020 8:20 am
- Location: Budapest, Hungary, Europe
- Contact:
Re: US making a character generator?
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?).
Re: US making a character generator?
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.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?
"Sir, our research shows that the bird is equal to or greater than the word."
Re: US making a character generator?
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.