Page 1 of 1 [ 8 posts ] 

Dantac
Veteran
Veteran

User avatar

Joined: 21 Jan 2008
Age: 43
Gender: Male
Posts: 3,672
Location: Florida

18 Mar 2011, 1:29 pm

I would like to know which programming language would allow me to make what I need below:

I have a PC game that has all of its stuff written down in .txt files. The game devs made it this way so people could make mods at their heart's content. We're talking unit stats and such not graphics or animation.

Problem is, they didn't provide a program to modify all those txt files easily so it is very hard to manually change parameters since you need to find where each item is manually.

What i want basically is what another fan did for another game. his editor program looks like this:

http://games.lisisoft.com/img/4/7/4777-1-mount-blade-warband-unofficial-troop-editor.jpg

(image too big to post here)

For the game I need it for, I would only like it to have one column listing the units and the options on the right side allowing me to type in the new parameters.

So.. which easy to use programming language or program (for someone who has never programmed anything but HTML) would let me do something like this?



wavefreak58
Veteran
Veteran

User avatar

Joined: 26 Sep 2010
Age: 63
Gender: Male
Posts: 4,419
Location: Western New York

18 Mar 2011, 2:38 pm

For your own use or for distribution?

For yourself, suck the text files into a database and use data aware controls in something like Visual Studio. I don't use Visual Studio but it works.

If you are going to distribute to other people it then it's more of a challenge.


_________________
When God made me He didn't use a mold. I'm FREEHAND baby!
The road to my hell is paved with your good intentions.


Dantac
Veteran
Veteran

User avatar

Joined: 21 Jan 2008
Age: 43
Gender: Male
Posts: 3,672
Location: Florida

18 Mar 2011, 3:49 pm

wavefreak58 wrote:
For your own use or for distribution?


For myself only.

Quote:

For yourself, suck the text files into a database and use data aware controls in something like Visual Studio. I don't use Visual Studio but it works.

If you are going to distribute to other people it then it's more of a challenge.


Thanks i'll take a look at it.



Dantac
Veteran
Veteran

User avatar

Joined: 21 Jan 2008
Age: 43
Gender: Male
Posts: 3,672
Location: Florida

18 Mar 2011, 6:12 pm

In this game, each ship is made up of three sections. Bridge, Hull and Engine. Each section has about 10 different variants and each variant comes in 3 different sizes. Then there are about 50 different weapons in 3 different categories (small,medium,large). There is one text file for each of the above listed things. Each text file has dozens of different stats that make up the in-game item.

There are nearly a hundred+ .txt files involved altogether.

So as you can see its a lot of stuff. Hence why I think the easiest thing would be to have the program simply be a GUI that you can just click on the thing you want to mod (say, a hull type called 'Armor') and then have the program simply 'open' the correct text file on a text box on the right side where I can make changes directly into the .txt file, no need for further menus.

Here's a visualization of what I'm trying to get at.

Three tabs on the top. Each tab has a large text editing box, a bullet box to select small,medium or large and a list of items that fall under each of the bullet-selected categories.

Image

The idea would be for the user to select the tab category of what he wants to edit, select the size in the bullet box (doing this populates the itemized list), select the item in the list below which then just has the GUI open the appropriate .txt file in the editor window.

That alone would cut a significant amount of time to make a mod vs. finding each individual text file (most under different menu trees!) and juggling nearly a hundred .txt files open at the same time in the windows bar.



wavefreak58
Veteran
Veteran

User avatar

Joined: 26 Sep 2010
Age: 63
Gender: Male
Posts: 4,419
Location: Western New York

18 Mar 2011, 6:41 pm

Sounds like you need to make a relational database. A different table for each type of record with keys linking them.


_________________
When God made me He didn't use a mold. I'm FREEHAND baby!
The road to my hell is paved with your good intentions.


Dantac
Veteran
Veteran

User avatar

Joined: 21 Jan 2008
Age: 43
Gender: Male
Posts: 3,672
Location: Florida

18 Mar 2011, 7:48 pm

im ignorant in programming stuff but... how does it become a database when im trying to have the GUI simply edit the .txt file directly?



wavefreak58
Veteran
Veteran

User avatar

Joined: 26 Sep 2010
Age: 63
Gender: Male
Posts: 4,419
Location: Western New York

18 Mar 2011, 8:13 pm

It's really hard to know exactly what you are doing, but in general, any entity has attributes. In flat files, like text files, the attributes are usually different files. So in an role playing game you would have a file of characters, a file file for armor, a file for weapons, a file for treasure. Each file is tied to the main character file by some unique ID.

Without knowing the exact structure of your files, I can't really say what the relationships are or even if it is actually relational. I can't be much more help than this without actually doing it for you and I haven't the time.

If all you are doing is editing the files, why not just import them into a spread sheet and setup macros?


_________________
When God made me He didn't use a mold. I'm FREEHAND baby!
The road to my hell is paved with your good intentions.


peterd
Veteran
Veteran

User avatar

Joined: 25 Dec 2006
Age: 68
Gender: Male
Posts: 1,335

19 Mar 2011, 8:37 am

You will need, whatever technology you're using, to work out which variables in what files do what.

You will also need to map those variables to screens so that you can do things to them.

Do yourself a favour, learn a little bit of HTML and a little bit of xQuery. That way, you can go from the text files to the screen with a program in a single text file. Point your browser at www.exist-db.org - it won't cost you anything and you can start work at once, using the XQuery sandbox to read your files and show you what's in them.