• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
March 28, 2024, 07:10:19 pm

News:

Don't be hasty to start your own mod; all our FFT modding projects are greatly understaffed! Find out how you can help in the Recruitment section or our Discord!


Control Panel Development Discussion

Started by lirmont, December 10, 2011, 04:03:58 pm

lirmont

December 10, 2011, 04:03:58 pm Last Edit: January 08, 2013, 04:52:13 pm by lirmont
As some of you may know, Tethical is already at a playable stage in development. That is, you can log into a Tethical server process, create or join a game, and be assigned a party of characters at random. You can then move your party members and attack other party members via a menu system. The game informs you whether you've won (all the other player's characters are at zero HP remaining) or you've lost (all your party members are at zero HP remaining). This is a tactical RPG's basic form, and this is what Tethical is right now.

As a reminder, Tethical aims to clone what FFT did before it. As such, the infrastructure for rules that govern gameplay is being developed. However, there are too many rules to incorporate into the next iteration of Tethical. That is to say, the format is written in a manner that is easily confusing considering it relies heavily on indices (which are numbers as opposed to human-readable information like "STR" or "SPD"). Furthermore, we have to consider that this will be a platform for further game development (rather than engine development), meaning that there should be a serious focus on a person's ability to add, remove, and change the information that Tethical uses to run.

I propose we start working on a Tethical control panel application. You may or may not be familiar with my other project related to Tethical's development, but I submit that to you as evidence of my effort and desire to accomplish such a thing. What I need from everyone are ideas for the design of such a program's interface while work on the game continues. From here on, I'll just refer to Tethical as "the game".

In my opinion, this should be the only program you need to edit the game. Yet, you are tasked with providing ideas to make editing the game manageable for the average person. It will need to encompass a variety of game mechanics, like character statistics and classes, along with network-related settings, like what port the server process might run on, and user management, like the player logins, their characters, and statistics related to gameplay. I expect this design process to take at least several months after which point implementing the features of the program will begin. Though, it is very likely that I will begin on an early prototype before then for my own personal development use.

So, what form should your ideas take? I would greatly appreciate it if you would download and use Glade (for Windows users, the zip file you want is here: click to download; download, unzip, navigate to "bin", and finally run "glade-3.exe"). Glade is an interface designer. It not only allows you to make an interface quickly on your own, but it allows me to use what you've done in the actual program, so long as you provide the XML of your finished design. With that in mind, please do not upload such files until much later. I would prefer you take a screenshot and upload that until the designs become more complicated. Credit for significant contributions will be given within the program, and credit for feedback and quality assurance will be given as well.

Thanks for supporting Tethical with your time.

--

Installation:

  • Install MySQL (this is a database server):

  • Install MySQL Workbench (this is a database planning tool).

  • Install Tethical: go to downloads.

  • Install the control panel application (embedded Mono runtime packages):


  • Open tethical.mwb (a database planning file): download.

  • Run "Database" -> "Forward Engineer":

    • Check "DROP Objects Before Each CREATE Object".

    • Check "Generate DROP SCHEMA"

    • Check "Generate INSERT Statements for Tables"

    • Anytime after the first time doing this process, check "Do Not Create Users. Only Create Privileges"

    • Click "Next".

    • Check "Export MySQL Table Objects"

    • Check "Export MySQL Routine Objects"

    • Check "Export User Objects"

    • Click "Next".

    • Click "Next" again.

    • You will be prompted to enter in connection information created during your MySQL installation.

    • Click "Next" to load the database.

    • Close MySQL Workbench (unless you intend on making changes and forward engineering again).


  • Edit the configuration files for the control panel application:

    • base-locations.xml: Change the data to point to where you installed Tethical.

    • connections.xml: Change the data to connect to the MySQL database server you installed.


  • Finally, run the control panel and wait for it to flip "Select Game" from disabled to enabled; you can now use the control panel to make changes (though, the actual Tethical game will only respond to the changes you make add/deleting/changing maps for now).



--

Features by Program Category

General


  • Multi-game support.

  • Visual support for graphical elements outside of games (where applicable).




Art Directives


  • Ability to provide art direction in a textual and visual form (per game).

  • Ability to add an example image; name them as follows: example.png.

  • Ability to export all of the directives into a combined .PDF file; example: art-directives.pdf.




Game Mechanics


  • Ability to include many different types of game mechanics: permanent statistics, exhaustible statistics, raw statistics, programming-supplied values, class-specific programming-supplied values, temporary penalties, temporary bonuses, permanent penalties, permanent bonuses, class-specific, and scalar values.

  • Ability to assign formulas to game mechanics.

  • Ability to evaluate those formulas with arbitrary data (for testing).




Race & Gender


  • Ability to make a virtually unlimited amount of races (ex: humans, animals, monsters, etc).

  • Ability to make as many genders as necessary.

  • Ability to assign raw statistics specifically to race and gender combinations.

  • Ability to assign equipment slots specifically to race and gender combinations.

  • Ability to assign name pools specifically to race and gender combinations.




Class-Related


  • Ability to make a virtually unlimited amount of classes (jobs).




Targeting & Selection


  • Ability to make a virtually unlimited amount of area functions.

  • Ability to make a virtually unlimited amount of target functions.




Items


  • Ability to make a virtually unlimited amount of item categories.

  • Ability to make a virtually unlimited amount of items.




Resources


  • Ability to view a list of available music (per game).

  • Ability to add/remove music.

  • Ability to add/remove music tags (unlimited amount).

  • Ability to view a list of available bitmap fonts (per game).

  • Ability to view arbitrary text in the font of your choice (roughly as it would appear in-game).




Maps


  • Ability to view a list of available maps (per game).

  • Ability to update many features related to map customization.





Kivutar

Glade is a very great tool for building cross platform GUI. I used it for many projects with success. You can find tutorial here https://live.gnome.org/Glade/Tutorials .

We can also think to build this GUI using web technologies like Django. Because all the data is server side.

However, GTK3 can now be served in a webpage : http://www.webupd8.org/2011/09/gtk-32-released-with-html5-allows.html
so glade might be the right tool to use.
Tethical, an online FFT clone

lirmont

December 13, 2011, 04:16:32 pm #3 Last Edit: February 05, 2012, 02:47:57 am by lirmont
If they make the internet any more awesome, I don't know how I'll cope. GIMP in a browser window was awesome.

I've started my own test app in Mono's C# binding with GTK# (so it's still cross-operating system at this point) to start writing out the numerous MySQL queries for later when I'll probably port it to Python + GTK (because, from what I've read, Python handles GTK more how I'd want to do it anyway). Some of the things I have working so far are loading database connections (as in, you will be able to target any Tethical database available to you), available games to view/edit (per database connection + user privileges), displaying game mechanics of the loaded game, displaying the mechanic functions (the "arguments", if you've read my earlier descriptions) with the composite formula string in normal notation (it's still stored in RPN).

With the exception of data tables, please don't consider any of this design valid. I'd much prefer something that's universally agreed upon to be useful (rather than what's easiest/normal for me to produce):

Games:


Game Mechanics:


Game Mechanic Function Arguments:


Game Mechanic Function Arguments (in-line edit):



If the data you're seeing confuses you or you want to learn more, the discussion of all that stuff is available to be seen in the "Bars" thread, where we all discussed what it would take to get the CT feature up and running.

Kivutar

Oh that's great :mrgreen:
The new binding name for pyGTK is pyGI.

You can find all the doc here https://live.gnome.org/PyGObject and a good tutorial here http://python-gtk-3-tutorial.readthedocs.org/en/latest/

For people runing linux, I recommand Monodevelop http://monodevelop.com/ it handles C# and Python.
Tethical, an online FFT clone

lirmont

December 17, 2011, 02:48:51 am #5 Last Edit: February 05, 2012, 02:48:41 am by lirmont
Argument tester. This is a working C# implementation of the RPN expression evaluator of the python code I found for the Tethical server process, except this one lets you type in what you want (instead of doing the lookups based on a character in-game):



--

Race by Gender Raw Statistics



Class-Specific Programming-Supplied Values



Thoughts on the Raw Statistics? Do you think I should compress the view like I did for the class specifics view?

Thanks.


Kivutar

Very nice!

I can't launch the game no more, I filled a bug report to Arch Linux this bug with panda3d packaging.
Tethical, an online FFT clone

lirmont

December 19, 2011, 12:44:49 pm #7 Last Edit: February 05, 2012, 02:49:13 am by lirmont
I wonder what it is they changed. I look forward to when they release 1.8+.

Also, I went ahead an compressed the "Race by Gender Raw Statistics" display as follows:



All of the data from the previous screenshot is still attached, it's just not visible to the user. I don't have a good plan for editing/updating in this format yet, but I think this goes towards making the data much easier to deal with.

--

Race by Gender Character Name Pool


Game Settings (re: an "Options" screen)


--

Permanent Statistics


In my setup, I haven't accounted for things like "SpeedFromEquipment", "SpeedFromMagic", "SpeedFromClass", but this is where those programming supplied game mechanics would be used. Also, current HP doesn't currently include subtracting total bounded damage and adding total bounded healing yet, but this is where that would happen to result in current HP. Similarly, MP doesn't currently include subtracting total used MP, total recovered MP, and total removed MP, but this is where that would happen to result in current MP. Current CT is also missing total gained CT and total used CT, but this is where that would happen to result in current CT; it also may need to be bounded by CTMAX, but that's not what FFT does.

For instance, CT may end up looking like: 0 + (Actor.Sum.SpAtCPlusPhase) - (Actor.Actions.Sum.MoveAndAct * Battle.Actions.MoveAndAct.Cost) - (Actor.Actions.Sum.MoveOnly * Battle.Actions.MoveOnly.Cost) - (Actor.Actions.Sum.ActOnly * Battle.Actions.ActOnly.Cost)

The Actor.Sum.SpAtCPlusPhase is a running total of Actor.Sum.SpAtCPlusPhase + Actor.Sp (evaluated at C+ Phase). Battle.Actions.MoveAndAct.Cost would be a scalar value of 80. Battle.Actions.MoveOnly.Cost and Battle.Actions.ActOnly.Cost would be scalar values of 60.
--

Finished custom entry field to allow in-line help text


--

Support for GTK themes:



Kivutar

Nice work as always!
I finally managed to get panda working again on my laptop.
Tethical, an online FFT clone

lirmont

That's good to hear. I look forward to more new stuff.

3d model loading support for game maps (DirectX .x format; .EGG -> egg2x.exe -> loading through C# -> OpenGL)


I don't have the code in yet for common viewing features (like panning, rotation, scaling) because I had to write the .X loader myself (but I figured it would be easier to do than to port their .EGG code, considering they use it for more than just models), and you can see I don't have the infrastructure in for pointing to and picking up the filesystem where Tethical is yet, but it's coming along.

Kivutar

Awesome ! Do you plan to include a full featured a map editor in this project?

You can add a dependancy to panda and use panda libraries to load eggs. gomtuu managed to display a panda scene in Qt, there may be a way to do the same with GTK.

I started to work again on the replacement of the png textures for the skin. But I found a new bug in panda about spaces (I now use the CVS version). I reported the bug on the forums here http://www.panda3d.org/forums/viewtopic.php?p=78904&sid=a04d49248cf9bc79e7bd33e6ed8b3fec
Tethical, an online FFT clone

lirmont

I intend to have something that reads in the JSON of the map description (or creates its own in the case of adding) and updates or writes out changes because this will be a replacement for doing it by hand. I would also like to put the collision detection code I wrote during the rain program to work here to programmatically guess what the tiles are (so people don't have to do so much work).

For people reading this that aren't familiar with what JSON is, it's just a way of formatting data. The maps include such data as which tiles exist/are selectable, the scale of the map, its positional offset in the world, the background color to display, which effects (e.g. particle effects) to run and where, the model file to load, the music file to load, and which lights to setup.

I don't intend to add mesh editing controls for the actual map. Though I may provide an ability to save the .X file somewhere so that it can be used in blender. That will be a viable option for as long as you're using blender 2.49 or below, which is also what you'd need to use the existing .EGG exporter. There should probably be a note somewhere about not doing development work in blender 2.5+ until there is an .EGG exporter for it and an .X importer (both of which are available to you in blender 2.49). .X supports the frame transform (x, y, z, scale), multiple meshes, a list of materials, and frames (re: animation), so I don't think there will be any data lost between EGG and this format.

I may change to using .EGG directly in the future, but in C# that means I have to write a binding for each of the functions I want to use from the .DLL file (libpandaegg.dll probably), reference that DLL, then write the code to actually use the functions. I know what it looks like, but I admit that that's something I've yet to have to do (which makes me hesitant about spending time on it now).

Kivutar

I agree that we should not add mesh editing functionnalities. This editor is made to edit server side files.
We could use an interface similar to what Ganesha privide to edit tiles. Maybe displaying a matrix would be a good way to provide tile editing. We can already add a table for ground types in your database model.

Porting your curent C# code to Python would help using Panda instead of writing C# bindings ?
Tethical, an online FFT clone

lirmont

December 25, 2011, 08:12:03 pm #13 Last Edit: February 05, 2012, 02:49:51 am by lirmont
Oh, yes, when I port it over to python at the end of development, it won't have the same problems I face in C#. For this, I just mean I want something as a quick prototype that I can easily change/show/update based on criticism and opinions, which, for me, isn't GTK and isn't python yet (and to some extent isn't Panda3d when you find an undocumented feature). If I had to learn GTK in the context of python, I think I'd be less far along because it's not a langauge I know well enough (though there are certainly more useful examples out there for python and GTK than GTK# has currently). I recognize that python has the superior implementation of GTK and, of course, it has immediate access to Panda3d, which is why the final project will exist in python. For the python port, these features I want will hopefully be able to link into Tethical's actual code. I hope that results in needing to make changes only to your copy of the game without needing to update the control panel software, but I don't care for this in the C# prototype. Outside of database interaction, the plan is currently just to quickly provide a look at what the real feature is that I want. I had hoped and do hope that as this progresses more people will speak up about what they'd want out of this. I can't imagine no one has an opinion. If the 2 months I quoted pass without many community-supplied ideas to improve this based on using other FFT tools, so be it, though.


--

Maps being read out of .egg files (converted to .X) in the filesystem driven by .json map files in the filesystem:








--

More mapping updates:








I haven't put in the functionality yet, but basically there will be two 3d cursors. One is for navigation. The other is for locking in a comparison tile. I haven't skinned the cursor models I made yet, but I intend to do it a la gold and brown.


--


Map and tile data linked to controls; slopes loaded out of Tethical filesystem; tiles hard-coded (but I don't know what numbers are in use, since I just took the names out of Ganesha):






--

OGG file playing + artist/title/length:



--

Map lights:




Kivutar

Oh man, I'm about to cry. This is awesome!
Tethical, an online FFT clone

lirmont

Thanks! I'm not ready to write the save map code just yet, since I'm still missing a few things. I know right now I'm missing point lights in the "Lights" tab. I'm missing a whole tab called "Tilesets" (which I assume map to formation screen tile sets). I'm missing numbers to attach to the ground types (i.e. "Natural Surface"), but I couldn't find them in the programming so I need clarification on where the numbers for "type" come from. Once all that is done, I want to write a quick "Go Offline"/"Go Online" feature that will let you work on a file system without needing to connect to a database first. It will not have as many available links as the default approach, but I realized it will be bothersome to depend on a database to edit something it has only a little bit to do with (i.e. the name of game the file system folder maps to).

Unfortunately, the holiday season is over, and so I will have other obligations than this control panel.


lirmont

Yep, that looks like it. I'll get it integrated when I work on the program next. Thanks!

I also had an idea to show the items with a tile image to the left of the name in the drop-down list, so look forward to that, too, I guess. I plan on cutting an example tile out of the map texture images. For the prototype, I'm only planning on doing the basic ones (like grass, water, sand, stone) to demonstrate the idea, but the final product will end up with something complete.

Pickle Girl Fanboy

Quote from: lirmont on January 03, 2012, 03:29:42 pmI plan on cutting an example tile out of the map texture images. For the prototype, I'm only planning on doing the basic ones (like grass, water, sand, stone) to demonstrate the idea, but the final product will end up with something complete.

Remember that you need non-copyrighted terrain tiles when this go public.

lirmont

lol, yeah. I needed that reminder. These are made with the same program I used for my own maps, and so they are free and clear.

Anywho:



As for terrain types being in the database, I'd like to do that. When I get around to typing all that information in, it will be in the form of: id, gameId, externalId, name. The externalId will be able to match whatever FFT had or whatever you want. I would like the externalId to be the thing that gets referenced, though. That way you can still push maps between different games (so long as they at least have the same terrain external id's set to the same terrain types). I need to think about terrain more (or it needs to be discussed) before I commit to that design. I feel like FFT required certain flags to enter certain tile types. If that's the case, we'll also need a table that references tile type and a status table.