Topic: New Server DB Edit tool available  (Read 3613 times)

0 Members and 1 Guest are viewing this topic.

Offline Herr Burt

  • Putting the "B" back into SFC
  • Lt. Junior Grade
  • *
  • Posts: 499
  • Gender: Male
  • Providing for the Providers
New Server DB Edit tool available
« on: January 08, 2006, 11:37:42 pm »
Over the last couple of weeks not taken up by Christmas travel, I have built an editor that should allow you to edit almost all of the map properties on an active campaign.  This is part of a project I am working on to make Economic War easier to run, but I thought I'd share it with everyone in case any other server admin finds it useful.

*Did a bug mess with your game and now you need to reset the DV of a hex?  Now you can!
*Want one of your races to give one of their hexs to an ally?  Now they can!
*Want to remove or add a planet or base?  No problem!

This is phase I.  It has no GUI's, but does have a lot of error checking and will allow you to change (on the fly):
Empire Owner
Cartel Owner
Planets in the hex
Bases in the hex
Current Empire DV
Maximum Empire DV
Current Cartel DV
Maximum Cartel DV
Hex Economy


Phase II will allow you to change player prestige and terrain.   Phase two will also let you halve all the DVs of your map, which is useful when you are starting a server and want to give races the ability to boost the DVs in their home territory.  (This last should have been in phase I, but I forgot.  In the meantime you can still do this with Evil Dave's DB editor, since no brand new DB will have yet been corrupted.)

Phase III will add GUI's to all of the above.


This editor seems to work on my sample databases.  It seems to work on databases that no longer work with EvilDaves DB editor.  However, software tested only by its creator tends to crash.  Moreover, it tends to crash and destroy your data.  (That is its job and chief pleasure in life.)  SO FOR THE LOVE OF ALL THAT IS HOLY MAKE A BACKUP OF YOUR DB BEFORE YOU TRY TO USE THIS TOOL!!!!

To help ensure that someone doesn't accidentally destroy ]their only copy of their database, I've made this editor a little less user friendly.  It *must* be in the same directory as your database, your database *must* have the default name Sfc2Spd.sds, and the output file *will* have the name temp.sds.  This prevents accidental overwriting of the database.

To use the edited database, move the Sfc2Spd.sds file to another directory (where it will be safe) and change the name of temp.sds to Sfc2Spd.sds.

Simple, eh?

Here you go.  Happy Warmongering!

ftp://www.fourpower.com/pub/HBMapEditor.zip

If it give you any trouble, please let me know.

I'll add this post to the admin forum (for ease-to-find) eventually, but we all know this is the forum that server admins read first and foremost.

-Herr Burt
« Last Edit: March 03, 2006, 12:39:58 am by Herr Burt »
Happy Warmongering!

Offline Dizzy

  • Captain
  • *
  • Posts: 6179
Re: New Server DB Edit tool available
« Reply #1 on: January 09, 2006, 12:28:34 am »
WOW!

Nice work S.

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Re: New Server DB Edit tool available
« Reply #2 on: January 09, 2006, 12:47:33 am »
 :woot:  Good show Herr Burt! Hex gives me such a headache.

Offline Dizzy

  • Captain
  • *
  • Posts: 6179
Re: New Server DB Edit tool available
« Reply #3 on: January 09, 2006, 05:35:26 am »
Hexx is making you run the KCW? OMG!  :o

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Re: New Server DB Edit tool available
« Reply #4 on: January 09, 2006, 08:33:51 am »
No, No, No... Hexadecimal file data gives me a headache!

Offline Braxton_RIP

  • Lt. Commander
  • *
  • Posts: 1073
  • Gender: Male
    • Dynaverse.net
Re: New Server DB Edit tool available
« Reply #5 on: January 10, 2006, 12:27:56 pm »
It isn't nice to call people names, Bonk   ;D :D ;)
Braxton,
Old Geezer

Typical Fleet:
F-DNL, F-CB, F-CLC
Braxton's Fleet:
F-CVTCR, F-BTR, F-BTL+

Offline Hexx

  • Sexy Shoeless Lyran God Of War
  • Captain
  • *
  • Posts: 6058
Re: New Server DB Edit tool available
« Reply #6 on: January 10, 2006, 12:32:10 pm »
It's OK.. I've got powdered Tylenol around here somewehre...
Courageously Protesting "Lyran Pelt Day"

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Re: New Server DB Edit tool available
« Reply #7 on: January 10, 2006, 02:17:16 pm »
Sigh... what a bunch of knuckleheads...  :D

I think I'll take that tylenol now.

Offline RazalYllib

  • Imperial Romulan Information Service-senior advisor
  • Lt.
  • *
  • Posts: 784
  • Gender: Male
    • IRIS
Re: New Server DB Edit tool available
« Reply #8 on: January 10, 2006, 05:43:23 pm »
Great job even if all does not go per creators wishes
...i am thinking flatfile modification right?

Should fill in the holes til the sql is 100%
Comes a time when the blind man takes your hand
Says "don't you see?"
Gotta make it somehow
On the dreams you still believe
Don't give it up
You got an empty cup
Only love can fill
Only love can fill

Offline KAT Chuut-Ritt

  • Vice Admiral
  • *
  • Posts: 26163
  • Gender: Male
Re: New Server DB Edit tool available
« Reply #9 on: January 10, 2006, 11:08:34 pm »
Congratz Scippy on getting that project completed,  WTG Bro!

Offline NuclearWessels

  • Evil Dave
  • Serverkit Development Team
  • Lt. Commander
  • *
  • Posts: 1249
  • Scripter and general nuisance
    • NukeDocs
Re: New Server DB Edit tool available
« Reply #10 on: January 11, 2006, 12:13:59 am »
Very Cool Scip!

(As Dave gives thanks that he doesn't have to open up the dbedit code for debugging  ;D )

dave

Offline Herr Burt

  • Putting the "B" back into SFC
  • Lt. Junior Grade
  • *
  • Posts: 499
  • Gender: Male
  • Providing for the Providers
Re: New Server DB Edit tool available
« Reply #11 on: January 11, 2006, 11:39:00 am »
Thanks, everyone, for the compliments.  I just hope this thing works as well as I want it to.

Very Cool Scip!

(As Dave gives thanks that he doesn't have to open up the dbedit code for debugging  ;D )

dave


Oh my word!  Evil Dave!!!    :o

THE MASTER RETURNS!

Great to see you here again, Dave.   I hope things are going well with you.  By the way, I hope you don't mind, but I got frustrated one day while the kids were nagging me too much to think, so I dug up your source code and lifted a line that converts a reverse-byte hex number into a decimal number.   It was *much* more elegant than the function I was trying to write.

-S'Cipio the Herr Burt
Happy Warmongering!

Offline NuclearWessels

  • Evil Dave
  • Serverkit Development Team
  • Lt. Commander
  • *
  • Posts: 1249
  • Scripter and general nuisance
    • NukeDocs
Re: New Server DB Edit tool available
« Reply #12 on: January 11, 2006, 12:19:20 pm »

Hey no sweat!  Lift whatever you like - that's what it's there for!

thx again for the editor!
dave

Offline NuclearWessels

  • Evil Dave
  • Serverkit Development Team
  • Lt. Commander
  • *
  • Posts: 1249
  • Scripter and general nuisance
    • NukeDocs
Re: New Server DB Edit tool available
« Reply #13 on: January 11, 2006, 12:21:04 pm »

... Lift whatever you like...

Hmmmm ... wait a minute ... Kroma's not around is he?
<shudder>
 ;D

Offline FA Frey XC

  • Site Owner
  • Administrator
  • Captain
  • *
  • Posts: 5695
  • Gender: Male
    • XenoCorp.Net
Re: New Server DB Edit tool available
« Reply #14 on: January 11, 2006, 06:41:15 pm »
LOL !!!
Vice President of Technology,
Dynaverse Gaming Association
Owner, CEO XenoCorp Inc.


Offline Herr Burt

  • Putting the "B" back into SFC
  • Lt. Junior Grade
  • *
  • Posts: 499
  • Gender: Male
  • Providing for the Providers
Re: New Server DB Edit tool available
« Reply #15 on: March 02, 2006, 01:35:37 pm »
Arrgh!

Bonk clued me in last week that this utility isn't running for people who don't have Borland C++ Devloper installed on their system, which makes it not useful at all.  I thought I had built it as a standalone executable but it seems to rely on having the compiler installed.  I promised I'd rebuild it to fix this.

I finally got some free time to try this last night, and was frustrated.  I'm not sure what I'm missing, but obviously I'm still doing something wrong.  It works great on the machine I built it on, but on no others.  I haven't been able to make it work yet.  The programming tutorial book that came with the software is useless in this regard and the actual manual is only available as electronic help pages.

Someday I will find the man who decided it was a good idea to start releasing software with electronic help pages rather than a real, hardbound manual.  He will die slowly as I strangle him with his own large intestine.  But I digress.

In any event, for now, don't bother downloading this utility yet.  It won't run unless you have Borland C++ version 5 installed on your machine.  I'll fix it eventually and let you know when it is ready.

-Herr Burt
Happy Warmongering!

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Re: New Server DB Edit tool (un)available
« Reply #16 on: March 02, 2006, 03:52:55 pm »
I'm not sure on this and it seems counterintuitive, but check the project options and ensure the "build with runtime packages" option is clear. 

edit: actually I think that refers to borland delphi projects...

...what you're looking for is the flag to statically link the runtime dlls.

perhaps since it is a console app, uncheck "use vcl" (Visual Component Library) in the console wizard options?

http://webpages.marshall.edu/~dementiev/ist163/bcppstart.html
« Last Edit: March 02, 2006, 04:09:40 pm by Bonk »

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Re: New Server DB Edit tool (un)available
« Reply #17 on: March 02, 2006, 04:28:33 pm »
Did some more digging - seems it only required the three files in this zip:
http://withglee.com/downloads/BCBAncillary.zip
VCL50.BPL
CC3250MT.DLL
BORLNDMM.DLL
it runs when they are placed in the same folder as the exe.

Check this page to statically link them?:
http://groups.google.ca/group/borland.public.cppbuilder.non-technical/browse_thread/thread/87fc9c231a3d766/e7638867dd19b6cb%23e7638867dd19b6cb?sa=X&oi=groupsr&start=0&num=3
Ack! what a link...
here's the text:
Quote
ON Project options...
On the linker page, un-check 'Use dynamic RTF'
On the Packages page, un-check 'Build with runtime packages'
The defaults changed at some point and are now set to use DLLs.



gonna play with it on the KCW db... but willl not run the server to test it...


Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Re: New Server DB Edit tool (un)available
« Reply #18 on: March 02, 2006, 04:33:19 pm »
I gave it a try, seemed to work OK. It only edits the map I gather...

might be nice to add a facility to edit a list or range of hexes...


edit: Oh, and I'll send you my take on the political tensions soon...
« Last Edit: March 02, 2006, 05:16:38 pm by Bonk »

Offline Herr Burt

  • Putting the "B" back into SFC
  • Lt. Junior Grade
  • *
  • Posts: 499
  • Gender: Male
  • Providing for the Providers
Re: New Server DB Edit tool (un)available
« Reply #19 on: March 03, 2006, 12:39:11 am »

Check this page to statically link them?:
http://groups.google.ca/group/borland.public.cppbuilder.non-technical/browse_thread/thread/87fc9c231a3d766/e7638867dd19b6cb%23e7638867dd19b6cb?sa=X&oi=groupsr&start=0&num=3
Ack! what a link...
here's the text:
Quote
ON Project options...
On the linker page, un-check 'Use dynamic RTF'
On the Packages page, un-check 'Build with runtime packages'
The defaults changed at some point and are now set to use DLLs.



gonna play with it on the KCW db... but willl not run the server to test it...





Woohoo!  That did it!

Thanks, Bonk!  I don't know how long it would have taken me to work that out.  OK, the zip file is now ready to be downloaded and used.   :-D

Quote
I gave it a try, seemed to work OK. It only edits the map I gather...

might be nice to add a facility to edit a list or range of hexes...


Yes, right now the download is only what is described in my first post as Phase 1.   I've already added the ability to adjust all the hex current DVs, either by half or by a set amount.   I've also added the ability to generate reports on a race's total econ, total number of planets, and total number of bases.  But the files these have been added to aren't ready for downloading yet.

I still want to add the ability to adjust player prestige, terrain, and to adjust political tension ratings.    (I look forward to what you are going to send me.)

I'll call all of this Phase II.

What other sort of hex ranges might be useful for editing all at once?

-Herr Burt
Happy Warmongering!

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Re: New Server DB Edit tool available
« Reply #20 on: March 03, 2006, 07:04:36 am »
Glad I could help! (Actually, thank the kind Mr. Pete Fraser who posted that on the borland.public.cppbuilder.non-technical google group  ;D  - here's the link to the list of  groups in borland . public . cppbuilder - might come in handy for stuff like this... ;))

Re hex ranges: I was thinking of a format where you could just loop through the hex editing function by passing it a list of hexes and parameters to edit, give the option for a single hex , range or list. I was thinking it would be good to be able to pass it input strings like:

list:
h0,0;h2,4;h5,8;h20,10;h16,22:EN=Klingon;CN=Neutral;PN=None;BN=None;ME=50;CE=50;EMDV=20;CMDV=20;ECDV=10;CCDV=10

or a range:
hr0,0-10,10:EN=Klingon;CN=Neutral;PN=None;BN=None;ME=50;CE=50;EMDV=20;CMDV=20;ECDV=10;CCDV=10

or maybe even a combo:
h0,0;h3,4;hr10,10-20,20;h25,25:EN=Klingon

...where only the hex properties specified are edited such that you could reset the whole map's economy to one value without disturbing the other properties, for example:
hr0,0-39,29:ME=20;CE=20
or DV:
hr0,0-39,29:EMDV=20;CMDV=20;ECDV=10;CCDV=10

So you can gang-bang edit hexes... this would be thinking forward to a gui with input textboxes for the list/range and dropdowns and textboxes for the properties... to generate the input string for the looping hex editing function.

Don't know it that's easily doable (or makes sense or is user friendly) with your setup but I was thinking it might be nice.


Did you dump the VCL dependency for this console version? I expect it would decrease the size of the exe considerably as vcl50.bpl is the largest of those three libraries at 1.92 MB. (edit: oh, I just downloaded it and the exe is only 219 KB... so its probably not worth the trouble...or borland is smart enough to only link in the dependency functions actually used...)


I'll put together my take on the tensions (and preceeding db portions) for you later today so you'll have it for the weekend if you get a chance to work on this some more.

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Re: New Server DB Edit tool available
« Reply #21 on: March 03, 2006, 07:49:11 pm »
Make that tomorrow for the tensions info. I got sidetracked playing with VMware today...

Offline GDA-S'Cipio

  • Brucimus Maximus
  • Captain
  • *
  • Posts: 5749
  • Gender: Male
  • If I took the bones out, it wouldn't be crunchy.
Re: New Server DB Edit tool available
« Reply #22 on: March 04, 2006, 01:07:45 am »
Make that tomorrow for the tensions info. I got sidetracked playing with VMware today...

No worries.  I'm tossing thing together for my daughter's birthday, and preparing for a business trip.  It will be a few days before I can get to it anway.

Thanks for all your efforts!

-S'Cipio
"I cannot undertake to lay my finger on that article of the Constitution which granted a right to Congress of expending, on the objects of benevolence, the money of their constituents."  - James Madison (chief author of the Constitution)

-----------------------------------------
Gorn Dragon Alliance member
Gorn Dragon Templar
Coulda' used a little more cowbell
-----------------------------------------


Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Re: New Server DB Edit tool available
« Reply #23 on: March 04, 2006, 08:15:40 am »
PM sent... (to GDA-S'Cipio)...  just let me know if anything needs further clarification.