• The VOIDRUNNER'S CODEX is coming! Explore new worlds, fight oppressive empires, fend off fearsome aliens, and wield deadly psionics with this comprehensive boxed set expansion for 5E and A5E!

D&D 4E D&D 4e Character Builder (Made in Java)

packetpirate

First Post
Not too long ago, I began to work on a D&D 4e Character Builder in Java. I haven't gotten very far, but I thought I'd show everyone my progress and get some suggestions as to how I should progress, as well as hopefully some commentary from fellow programmers.

So far, the ability score point spending system is working and there is a measure in place to determine whether or not the character's scores are legal or houseruled.

I haven't gotten around to creating a character class yet to keep all the variables in, but that will be the next thing I do. After that, I want to convert it from AWT to Swing and hopefully get a layout working so that the elements aren't all clumped together.

After that, I'm going to add some new fields, such as defenses, HP, skills, and other miscellaneous stats. What I'm having trouble deciding is how to proceed with feat and equipment selection. This is where the developer commentary would be appreciated.

Enough talk, though. Here's a screenshot of what I have so far.
 

Attachments

  • dnd_current_04.jpg
    dnd_current_04.jpg
    22.4 KB · Views: 975

log in or register to remove this ad

packetpirate

First Post
Really? Nobody has any comments on this? I decided to start working on it because of WotC putting theirs online and making it accessible to DDI subscribers only.

EDIT: [MENTION=86402]marli[/MENTION] Eventually, yes. I'm not familiar with the Android API, though, so that will have to wait.
 

fireinakasha

First Post
This is a pretty cool idea. I'm not a big fan of 4e (more of an anti-fan) but I always appreciate fan contributions to any arena.

A suggestion for the feats/equipment: if you had a list of all the possible choices for a character, that would be a lot to enter and then you'd have to keep up with all the new material as it came out. I don't know how much time and effort you want to expend on this. Maybe the best way to work it would be to have a field where the user could input the name of the feat or item, it's description, stats, etc., and then have it added to the character sheet. I think this might end up being preferable to hard-coding every feat and item, especially considering that the list of things you would have to code is going to grow exponentially as time passes. But again, it depends on how much you're willing to invest in this.
 

packetpirate

First Post
But there's the problem... that would allow a user to enter anything he wants. He could add epic tier level feats if he wanted. I want to figure out a way to add all the items and their prerequisites in hard coding. I was thinking of gathering the information from a file and just reading from the file, rather than hard coding each item. I could probably utilize vectors for actually storing them, but I don't know how I'll keep track of the prerequisites to take a feat/piece of equipment.
 

fireinakasha

First Post
If you're going the route of files, I would suggest looking at some modding community guides for Neverwinter Night 2DA files. (You don't need to know the game)

The idea is: Each 2DA file is basically a glorified spreadsheet text file. Each entry is its own line, each entry has multiple fields for different variables, separated by a space. All character options - feats, class ability, races, you name it - are listed in these entries with an associated ID number. Then, in the entry for each feat/class ability, there are fields for prerequisites. Like, let's say Two Weapon Fighting has a feat ID of 23 (I'm using 3.5 feats here, because I don't know 4e). Then, in the entry for Improved Two Weapon Fighting, the "required feat" field would read 23, and the "required dexterity" field would read 17, and the "required BAB" field would read 6.

The 2DA files also contain fields for other things. For instance, the "description string ref" field has an ID number linked to the file with the text blocks for different descriptions/names. So on and so forth. It's a pretty efficient system for cataloging the base skeleton of a feat system, and it makes it easy to add new feats as they are created, by just appending to the file.

The 2DA file system also might offer a solution for the factoring in the effects of feats. In the 2DA files for spells, there's a field with an ID for a script file. When you cast the spell, the game looks at that field and executes the associated script. I don't know how hard this would be in Java, but maybe you could do something similar for feats, where there's an ID to a file with some logic blocks to factor in the effect. Like with Weapon Focus, it could be something along the lines of "ongainfeat {weaponchoice = X} onweaponequip {if weaponequipped=weaponchoice then attack++}". Or whatever. Excuse my psuedo code.
 
Last edited:



Garthanos

Arcadian Knight
Ink, they can't do anything as long as I don't charge for it. I can put it on the app market as a free app.

Whether you charge for anything is inconsequential.
Don't include copyright material.

That said it is possible to have very useful tools that dont include copyright materia. Verbatim text for instance is a no no.
 


SteveC

Doing the best imitation of myself
For what it's worth, I like it and I'd be happy to help you test it.

If you go the route of having data files that user can easily work with, I'd be happy to work on a dataset for different classes as well.

The basic interface looks good, if a bit basic. Do you want any specific comments or ideas? Let me know, I'm full of it... err full of advice. :)

--Steve
 

Remove ads

Top