Mod Development Programs. - Page 3

Mod Development Programs.

Resources to get you going on your new project, or to help you over some emergent problems during your development cycle.

Moderator: Moderators

llama
Posts: 5
Joined: 31 Oct 2006, 04:18

dump unit stats to a table

Post 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";
}
------
User avatar
TheBigPK
Posts: 235
Joined: 22 Jun 2007, 09:24

Post by TheBigPK »

the file universe links are broken... is there anywhere else scriptor or cobbler is hosted?

edit: durr, uf has em
jordan
Posts: 1
Joined: 25 Mar 2008, 09:33

Re: Mod Development Programs.

Post 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.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Mod Development Programs.

Post 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?
User avatar
BlackLiger
Posts: 1371
Joined: 05 Oct 2004, 21:58

Re: Mod Development Programs.

Post 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.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Mod Development Programs.

Post 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.
User avatar
Alchemist
Posts: 81
Joined: 21 Oct 2005, 23:46

Re: Mod Development Programs.

Post 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.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Mod Development Programs.

Post by Argh »

Set it to TA:K mode, let the linear constant to 65536, angular constant to 182.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Re: Mod Development Programs.

Post by rattle »

044444444444444444444444444444444444444
daan 79

Re: Mod Development Programs.

Post 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
User avatar
Hoi
Posts: 2917
Joined: 13 May 2008, 16:51

Re: Mod Development Programs.

Post by Hoi »

daan 79

Re: Mod Development Programs.

Post by daan 79 »

tx greet program
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: Mod Development Programs.

Post by TradeMark »

someone should update the broken links from the first post, maybe some admin, if the poster isnt around here anymore?
Akumu
Posts: 7
Joined: 18 Jun 2010, 15:14

Re: Mod Development Programs.

Post 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.
Attachments
ts_general.png
(154.71 KiB) Downloaded 2 times
ts_maniac.png
(136.84 KiB) Downloaded 2 times
shotb.gif
(91.08 KiB) Downloaded 2 times
Akumu
Posts: 7
Joined: 18 Jun 2010, 15:14

Re: Mod Development Programs.

Post by Akumu »

lol, sorry for reviving this old thread but it seemed like the perfect place to post.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Mod Development Programs.

Post 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.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: Mod Development Programs.

Post 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.
Akumu
Posts: 7
Joined: 18 Jun 2010, 15:14

Re: Mod Development Programs.

Post 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.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Mod Development Programs.

Post 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.
SeanHeron
Engines Of War Developer
Posts: 614
Joined: 09 Jun 2005, 23:39

Re: Mod Development Programs.

Post 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.
Post Reply

Return to “Game Development Tutorials & Resources”