Yaffaif XML format

Work continues on building out Orion’s quest. In the current dev-build version there’s another Kobold guard who patrols around at night, sleeps during the day, and wanders about in his down time. Quite a few bugs have been squashed, and the expression parser upgraded again. Oh yes, underwear is now made of a stretchier cotton and for the time being there’s some emergency backup undergarments in the still hut. I was planning to release a public build once you could encounter the Queen, but I may drop an intermediate one just for the bug fixes and the guard(s).

What I have done though is finally gathered together all my little notes about the structure of the files that define the starting point for the game. Things had gotten so big I was forgetting stuff and having to go back to the source to see how things worked. It may be just a curiosity for those interested, though in theory you could get in there and make changes, or even create a different game (though in practice this could be difficult).

If you want to look under the covers open lib/GameF.jar with 7zip (or similarly competent archiver) and start with game.xml. 7zip allows you to edit files in the archive, and then re-pack it, but if you are going to do this I’d definitely recommend taking a backup copy of the original first!

yaffaif xml format.pdf (183.2 KB)

3 Likes

Hm- I took a peek, but I have neither the tools or training to actually risk poking around in there. How might save editing work, by chance? That’s something I’d feel more confident attempting. (Mostly to mess with my character’s shape, since I’m weird.)

1 Like

This is cool, even if I cant understand any of the inner mechanisms of the game, it’s still pretty cool!

Save editing would be really hard, not because I’ve taken any steps to stop it being done, it’s just the format. The save file is a Java serialization of the game model which basically encodes all the classes and objects, which is easy if the class files are loaded. There are tools out there to unpick it without them, and pack it back up again, but you’d have to really understand what you were looking at! I think I tried it once to try and recreate a bug. There’s nothing like Minerva (for flash) that makes it easy.

Having to do things like this is what inspired me to create the in-game debug mode! In it you can basically look at the game model and make changes using the GUI, and carry on playing. You can learn how to turn debug mode on here.

1 Like

Alright, cool! I’ll look into that and see what shenanigans I can get up to. =)

I don’t suppose you’ve made any master list or command that lists valid commands?
(Trying to mess with gain proportions, but can’t figure out how.)

No, I haven’t - it would have thousands of entries!

I think for what you are trying to do you need to mess with the character’s body’s part proportions which controls where extra weight goes.

The first step is to find out what all the proportions are at the moment:

/?$0.body.partDeposit
which should result in something like:
+ $0.body.partDeposit = Partition[Torso=5142, Legs=2322, Arms=5, Bust=858, Belly=90, Butt=238, Neck=212]

Most of their weight is going on their torso, and the next most significant target is their legs (this was from the std female shape). It’s worth noting that the belly and butt values represent extra padding in those areas above and beyond the legs or torso, rather than the whole mass of the belly or butt.

Those total 8867, so when this character gains 238/8867, or 2.7% goes to their butt. To make this a bigger proportion you’d need to change the butt value:

/=$0.body.partDeposit.add(butt,500)

Check:
/?$0.body.partDeposit
+ $0.body.partDeposit = Partition[Torso=5142, Legs=2322, Arms=5, Bust=858, Belly=90, Butt=738, Neck=212]

Now their butt will get 738/9367, or 7.9% of the new weight. You just need to eat!

Or, for a more cheaty way you can gain in grams like this for 10kg:
/=$0.body.addMass(10000)

Alright- thanks so much!

i looked at the debug guide and i still dont know how to get debug to work i know how to laun and everything but how do get debug working

@Catqueen Can you tell me what you did (DM me if you’d prefer)? Please make sure you have file extensions visible and you haven’t created the file as “gameFx2.props.txt”; on Windows 10 this is now in the file explorer’s “View” tab - check the “File name extensions” box.

Looking at this, I wonder if it has potential to become something very useful. I believe you started developing your game engine many years ago. You probably put a ton of effort into it. Maybe it can become a great tool for other people to make games based on your engine, using these features:

  • Quests
  • Maps
  • Movement
  • Body simulation
  • Body transformation
  • Dialogs
  • Clothing system
  • Eating simulation
  • Combat, weapons

I don’t know what your plans for the project are, but turning it into an engine usable by others seems like a pretty solid idea to me. Some people are good at developing engines, and others are good at creating content (storys, maps, quests, dialogs, etc.). The documentation you posted in this topic already looks like a great start to me.

I’m striving to get the engine as generic as I can within reason, so that I can use it for another game; either when I finish this one, or if I wanted to knock something up quickly for a game jam. It would be great to allow others to build on it too, both for the sense of accomplishment, and also because I like playing games like this!

As it stands:

  • Quests - completely defined in XML
  • Maps - in the sense of areas/rooms/doors are all in XML (there are no visual maps like Quest has - and I’ve no intention of adding them at the moment)
  • Movement - all code, but very flexible and works off the XML model
  • Body Simulation - all code, but driven by the definitions of Species.
  • Body Transformation - all code, but can mutate to any Species the game knows about (only Kobolds are exposed in game play at the moment)
  • Dialogs - all defined in XML
  • Clothing System - all code, but any new kind of clothing can be defined in the XML
  • Eating Simulation - all code, but any new kind of food/drink can be defined in the XML
  • Combat, Weapons - combat is all coded (taking it’s cues from Osric), weapons are defined in XML
  • Species - all done in code, but they form a hierarchy so minor variations would be quick to add
  • Jobs - new jobs for NPCs have to be coded at the moment, and I can’t see an easy way around this other than introducing a scripting language but Java has a few to choose from.
  • UI - very deliberately kept separate from the game, Model/View/Controller style.

At some point I’d like to make the source available, but I’ve been holding off for because:

  • I’d have to pick a license then go and add licence headers to every single source file.
  • I suspect answering questions about how the feck it all works would consume time I could be using to write the game. I’d probably need to build and run a Wiki.
  • I’d also have to write a manual on how to get started.

For non-coders to pick up the engine and run with it there’d probably also need to be a custom-built editor/designer. Something where you could click buttons and pull up forms to complete details and then it spits out the XML files. Not impossible to do, but I’d rather focus on the game for now.

1 Like

it wont work for me
it says “unable to access jarfile gameFX2 jar.”
on error
edit : nevermind sorry for sounding like a idiot i forgot to extract

Heyo, since this is my first time postin’ on this board, I’d like to say thanks for making this game! Its the bee’s knees!

My flattery aside, I wanted ask if making custom items is supported as of yet using an xml file? I’ve been keen to try making a few items.

Edit: Just realized that my question was already answered a few posts ago, my bad.

I’m glad you are enjoying it! It’s certainly possible to add many kinds of items, though if you want different coded behaviour you still need to code things in Java. This is actually quite an old copy of the XML format document, more up to date ones are available as a Patreon reward. In the background I’m working to tease apart the story and the engine, and hope to eventually have an engine only release for others to create stories on (it’s currently in a private git repo).

Thanks for the reply!

I didn’t realize that adding my own code was an option. Since that’s the case, I’ll take a crack at it and see what I can figure out. Am I mistaken in thinking that you programmed this in jdk8?

Also, I figure I should report on what I’ve gotten done so far using XML. So far, I figured out how to add items and the like, as well as a priestess who gives food out to the people of the village.

[Bug report(?): I also played around with the AirVolCc some and found a rather odd behavior. If you increase a character’s AirVolCc past a certain point, they’ll be described as emaciated. They’ll continue to be described as emaciated even if their AirVolCc is set back to 0.]

There’s stuff you have to do to add code due to the way class loading works. The simplest is to replace the main class and have it configure the engine Mediator class to know where to load things from.

Here’s a NetBeans 8.2 project which is the absolute minimal configuration for the engine to fire up without errors (yes, it’s targeted to jdk8, as that’s what’s mostly in the wild):

yaffaif-example.zip (84.8 KB)

It’s very much a blank slate, and my intention is to write a cookbook style guide to customising it. It’s a low priority though.

To get it to compile/run you need to copy the following files from Yaffaif to the yaffaif-example/lib directory:

  • GameF.jar, but rename it to GameE.jar (GameE.jar is the engine build but I don’t have a public copy of that yet)
  • GameFx2.jar
  • GameFx2Controls.jar

You’ve done well to get that far with the fairly minimal documentation!

The AirVolCc is a bit of a placeholder at the moment - I haven’t verified it’s operation as there’s nothing in the game that uses it yet. It’s intended to work with BodyMath.volOfGasCc and BodyMath.cylTensionN (ie. popping) for any future inflation content - but neither is used or tested. It’s probably suffering from overflow as wherever possible the game avoids floating point.