Page 3 of 4

dump unit stats to a table

Posted: 18 Oct 2007, 20:21
by llama
I hacked up a quick perl script to dump all units in a mod into a file I could import into a spreadsheet. I wanted to compare (in this case) sight ranges, so I sorted the data by that column after importing. OpenOffice also has a decent filter mode. e.g. you can filter to show units that have radar in the name, or in the description, or have scout in the description, and sort by sight range. Just remember to turn on "data has column headers" when sorting, so the headers stay at the top.

make sure your browser window is wide enough not to line-wrap anything. Then run
cat > ~/bin/springmod-unittable.pl
copy/paste, and hit ctrl-d.

run as springmod-unittable.pl units/* > unittable.dat
(e.g. after unpacking a mod, with mkdir BA; cd BA; 7z x /foo/bar/BA58.sd7)

OpenOffice can load the file with "new sheet from file". It can probably "link to external data" and keep refreshing itself from the file if it changes, but I didn't figure out how to get that to work.

One thing you should do is click on the D2 cell, and go to windows->freeze to keep the column headers and unit names fixed while you scroll the other part of the window.

------

Code: Select all

#!/usr/bin/perl -w

# Copyright 2007, Peter Cordes <peter@cordes.ca>
# GPL

# turn a directory of .fbi files into a table of unit stats
# suitable for viewing and sorting with a spreadsheet program
# doesn't go the other way, so you have to edit the fbi files, though.

# yes this is a quick hack.  no it doesn't get weapon stats.

use Config::File;

# rows are from an array of hash refs for each unit.  plain hashes collapse when pushed...
my @allunits;

# we need to know all the keys that any unit has.  These are the table columns
#my $filter = qr/germanname|weaponslaveto4/
my @taglist = ("unitname", "name", "description", "side", "buildcostenergy", "buildcostmetal", "buildtime", "maxdamage", "maxvelocity", "maxslope", "sightdistance", "radardistance", "sonardistance", "radardistancejam", "builddistance", "mincloakdistance", "cloakcost", "transportcapacity", "transportsize", "weapon1", "weapon2", "weapon3", "workertime" );
# TODO do something about the order here.  
# after these fixed ones, discovered ones are added in whatever order they  appear in the hash.
my %allkeys;
map $allkeys{$_}=1, @taglist;

foreach $fbi (@ARGV){
    my $config_hash = Config::File::read_config_file($fbi) || die "bad unit file $fbi";
#    map {s/; *$//} values %$config_hash;

# copy into a new hash with changed keys and values
    my %unithash;
    foreach $key (keys %$config_hash){
	my $lckey = lc($key);
	if (!exists($allkeys{$lckey})){
	    $allkeys{$lckey} = 1;
	    push @taglist, $lckey;
	}
	($unithash{$lckey} = $$config_hash{$key}) =~ s/; *$//;  # clean up trailing junk
    }
    push @allunits, \%unithash;
}

#@taglist = sort(keys %allkeys);
print join("|", @taglist), "\n";


foreach $unit (@allunits){
    my @unitstats = map( $$unit{$_} || "", @taglist);
    print join("|", @unitstats), "\n";
}
------

Posted: 15 Dec 2007, 23:53
by TheBigPK
the file universe links are broken... is there anywhere else scriptor or cobbler is hosted?

edit: durr, uf has em

Re: Mod Development Programs.

Posted: 25 Mar 2008, 09:47
by jordan
This would be very handy.Also there is a utility called Chili-Skinner that helps in the creation of uvmapping in gmax and 3dsmax.

Re: Mod Development Programs.

Posted: 26 Mar 2008, 20:35
by KDR_11k
I recall something like that, wasn't that an interim solution for MAX v3 or 4 because the UV mappers sucked back then?

Re: Mod Development Programs.

Posted: 28 Mar 2008, 00:18
by BlackLiger
I know no-one here but me actually uses it, but I find paint.net to be a decent image editing tool. It's kinda like photoshop stripped down.

Re: Mod Development Programs.

Posted: 28 Mar 2008, 00:42
by AF
photoshop cs3 loads 3x faster than paint .net on this machine and paint .net has a habit of freezing for 2-20 seconds at a time on all my computers, selecting things and doing text is especially prone to it.

Re: Mod Development Programs.

Posted: 04 Jun 2008, 05:20
by Alchemist
Can anyone give me the constants for Scripter? Mine seem to have been reset and I can't find where to re-download it.

Re: Mod Development Programs.

Posted: 04 Jun 2008, 05:45
by Argh
Set it to TA:K mode, let the linear constant to 65536, angular constant to 182.

Re: Mod Development Programs.

Posted: 04 Jun 2008, 16:06
by rattle
044444444444444444444444444444444444444

Re: Mod Development Programs.

Posted: 16 Aug 2008, 15:19
by daan 79
Is this scripter hosted by more sites than just fileuniverse.

I lost my old copy (well my computer has a hard time reading the disc :()

cheers in advantage

Re: Mod Development Programs.

Posted: 16 Aug 2008, 15:28
by Hoi

Re: Mod Development Programs.

Posted: 16 Aug 2008, 17:47
by daan 79
tx greet program

Re: Mod Development Programs.

Posted: 31 Jul 2009, 14:28
by TradeMark
someone should update the broken links from the first post, maybe some admin, if the poster isnt around here anymore?

Re: Mod Development Programs.

Posted: 21 Jun 2010, 14:28
by Akumu
Hi,

I was wondering if there's a tool that lets you create mods for the game without having to script everything by hand.
I suck at scripting so I was hoping to find something similar to TibEd1 which I use to mod C&C Tiberium Sun and RA2.
http://www.tibed.net/

I'll put some images on for those who are not familiar with it.

Re: Mod Development Programs.

Posted: 21 Jun 2010, 14:30
by Akumu
lol, sorry for reviving this old thread but it seemed like the perfect place to post.

Re: Mod Development Programs.

Posted: 21 Jun 2010, 16:42
by AF
It looks like that program can't create new units, only modify existing ones

In which case, all the values are there in plain text, all you need to do is find the but in the text file where it says a=b, imagine that b has a text box around it, and hen modify the value. There is no 'scripting' involved, and the files are rather obvious eg, armcom.lua must be the file for the unit armcom.

Re: Mod Development Programs.

Posted: 21 Jun 2010, 18:17
by TradeMark
Dont worry, in the future you cant use any program to mod the files, since its all programmed in lua files... dont bother making/finding something tool like that.

Well, okay, you can make a tool like that, but it will ofc work only with your own mod.

Re: Mod Development Programs.

Posted: 22 Jun 2010, 22:41
by Akumu
The program can add a copy of a unit to the game.
And you can save your mod so you could upload the mod file and someone can download and play it.

The old C&C games like RA and TS use a text file called a .tib, which is why this program is calles TibEd.
The rulles.tib contains all the info the game needs from tiberium growth and value to unit stats.
It also contains a map list for the campaign and some values like max in game money for skirmish.

So if Spring just uses text files like this too I can't see why we wouldn't have a similar program for the people who want to create their own mod but don't know code or scripting.
We just need this program and some base mod which can be edited.
Everyone will use the same basic game but with the mod of their choice just like they do now.

A program like this would also be very useful for the die-hard modders who already mod the game, sins it will help them to create and edit their mods a lot faster.

Re: Mod Development Programs.

Posted: 23 Jun 2010, 00:17
by FLOZi
I don't understand why you need a specialist program to edit a text file?

The concept of 'some base mod' doesn't really apply to Spring in the way you think it does, either.

Re: Mod Development Programs.

Posted: 24 Jun 2010, 00:02
by SeanHeron
I guess there would be some value in having a program that basiclly auto-makes what we'd here refer to as "Mutators" to a given Game(/Mod). I don't think there is one around.

What I can remember vaguely is a program that gives you an interface that is somewhat similiar to how you described TibEd - however, if you can't find that on the first page of this sticky, it's either no longer maintained (quite likely), or my memory fails me (equally likely).

Sorry I can't help any more.