Jump to content
  • Advertisement
  • entries
  • comments
  • views

SAGE Editors

Sign in to follow this  


I got fed up with manual editing XML files earlier, so I whipped up some editors:

Item Editor


This is the item editor. All 3 editors have this same basic layout, with the object editor having a couple extra options and the character having a few more on top. It allows you to enter the object's name (as seen in game, the ID is based off of the save name) and you can set the icon's asset name. Then you can set the verb text for the 3 verbs and finally the script (using Scintilla.)

Object Editor


Here is the object editor. It just adds the ability to set the scale of the object and mark whether or not it is visible.

Character Editor


And finally, the character editor. It adds the ability to set the character's text color as well as managing dialogue topics.

Nothing major going on with them, but way easier than manually editing XML. The ellipsis button doesn't work on any of these as when the editor is done the file selected will be imported. As these are just straight editors, there is no place to import to, so I'll just copy the sprites over for now.

Now that those are done, I can get back to work. I've decided to skip the 'demo' idea and just whip up a small game. I don't want to put out a demo for a game with terrible art (or art that is nowhere near what I plan on using), so I sat down and wrote up a really small game based on the old idea 'get locked in a house with others with the promise of treasure.' It's a pretty small endeavor, 6 scenes (6 rooms of the house), 4 puzzles, 5 characters. 4 rooms in the house have puzzles (leaving the entryway and 'treasure room') and there are 4 guests (the 5th will be the host.) I'm going to use the art that I've been posting (or at least, that art style.)

There's not a scene editor at the moment as I'm not quite sure how to go about it. Objects and characters are created and added via scripting, so I'm going to have to do some script generation magic. I could possibly use comments and tags in the script to mark different things. I'd like to do this for the above editors as well (for generating functions for new topics and such.) We'll see once I get to that points.

And I believe I just found a flaw in the engine. Currently, character (and objects) store a numeric state value. This is intended for storing a flag to specify something simple (i.e. a switch would be on at 0 and off at 1.) However, for characters this could be quite useless as I've been using them. For example, Testy had a state of 0 when before he introduced himself. Thinking forward though, topics may need their own state values. I'm working on the script where the host introduces himself and I got to thinking, what if in a different topic his state needs to be, lets say 7? Not going to work if that topic sets it to 7 and then another topic sets it to 3.

I was thinking I could just forego that for a lot of things and use state variables, but that is going to be problematic as well. For instance, if topic C is only visible once the character has introduced themselves, there's no way to show the topic when loading the state variable (unless I coded that, but that seems like quite a hack to me.) I'm thinking that the best option would be to simply add a state variable to topics and add some script functions (something like SetTopicState() and GetTopicState()) to allow altering them. As I'm using a class system, it won't be that much of a difference (instead of messing with character.State, topics would be mostly altering self.State.) Objects should be fine and I'll leave the character's numeric state as is; it could be useful along the way.

Ok, above idea is implemented. Each topic now has it's own numeric state that is accessed/modified via the character's SetTopicState() and GetTopicState().

I also found out that apparently control validation does not occur when you click on a menu item. So, after typing a huge long script I clicked File -> Save just to have the script revert to the default character script (not quite sure why that happened; apparently at some point I'm setting the script or something; I'll have to look into that). Luckily I had copied it all into Notepad++ before saving just in case lol. Easily fixed (via UserControl.ValidateChildren()), but I can't believe I've been doing this for several years now and hadn't realized that.

Anyway, the first character is finished, sans art of course. I am going to do all of the characters/objects and then I'll get to work on the art and finally the scenes. So, once I fail completely at the art, the majority of it will still be done and I can finish once I acquire art (and sound.) back to work.

As I am up to about 63 script functions and I have terrible memory, I set up a script template system (I had done this a while back, for the same reason, but it was more involved and I lost the code, so I started from scratch):


You can right click on the function names in the new Functions area and you have the option to 'Insert' or 'Copy to Clipboard'. Clicking on either shows the popup to enter the values and once you click OK it is either copied to the script panel or to the clipboard.

As its 4:30 now, I should probably go to bed.


Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!