Page 4 of 41
Posted: 13 Jul 2006, 13:22
by hollowsoul

Curse u unitsync
Able to get the unit info. But not able to change the mod & get unit info for a different mod....
Anyone know how to get the following to work
Note (only StarWars01.sd7 xtape.sd7) in mods directory as they got differently names sides to pick i.e Empire & Alliance Arm & Core.
Type python in console ( need to be in directory with unitsync.so i.e in omni directory)
- import os
import unitsync
os.chdir('/usr/share/games/taspring-linux-svn')
unitsync.InitArchiveScanner()
unitsync.GetPrimaryModCount()
mod = unitsync.GetPrimaryModArchive(0)
unitsync.AddAllArchives(mod)
unitsync.GetSideCount()
unitsync.GetSideName(1)
mod2 = unitsync.GetPrimaryModArchive(1)
unitsync.AddAllArchives(mod2)
unitsync.GetSideCount()
unitsync.GetSideName(1)
It just keeps returnin the first mod u looked up side info...
Anyone know what to do ?
Posted: 13 Jul 2006, 14:10
by Michilus_nimbus
You always have to reinitialise using UnInit() (only if it has been initialised before) and Init(isServer,ID) when changing the mod.
this does the trick over here:
Code: Select all
import os
import unitsync
os.chdir('/usr/share/games/taspring-linux-svn')
unitsync.Init(True,1)
unitsync.InitArchiveScanner()
unitsync.GetPrimaryModCount()
mod = unitsync.GetPrimaryModArchive(0)
unitsync.AddAllArchives(mod)
unitsync.GetSideCount()
unitsync.GetSideName(1)
unitsync.UnInit()
unitsync.Init(True,1)
unitsync.InitArchiveScanner()
unitsync.GetPrimaryModCount()
mod2 = unitsync.GetPrimaryModArchive(1)
unitsync.AddAllArchives(mod2)
unitsync.GetSideCount()
unitsync.GetSideName(1)
I hope it works for you too.
Posted: 13 Jul 2006, 14:15
by hollowsoul
think i owe u a keg of beer

should have a release in abit. just need to add support for fbo package setup
Posted: 13 Jul 2006, 15:42
by hollowsoul
Version 3 released.
Note :- Still have to code support for fbo will do later today. But should be possible if to run atm if u follow 1st post instruction..
Next few releases wil be mainly code cleanups. Nothing wrong with code. Just can be cleaner & fix the delay from changing mods.
And maybe extra options for Skirmish (i.e spectator teams) and any options to configure (if someone can make good case to add them in).
Posted: 13 Jul 2006, 15:43
by clericvash
Man you are like a god for me. I am getting closer and closer to dropping windows off my pc now :D
I will give it a go when you fully support FBO's script in using it, as i would love to use them together on ubuntu :)
Posted: 13 Jul 2006, 19:15
by hollowsoul
Should work for fbo packages now.
Need 1 symlink though. Read first post
Its only temporary have an idea so its not needed, just dont have time today to test it out
Posted: 13 Jul 2006, 19:48
by clericvash
I may try it out in a bit, one thing though, include how to make main.py executable and how to use it etc etc.
I may use linux, but doesn't mean i am good with it

Posted: 13 Jul 2006, 20:22
by hollowsoul
Code: Select all
chmod a+x main.py
ln ./main.py /usr/games/bin/spring-gui
type spring-gui to start up
dont forget to edit GLOBAL.py
Posted: 13 Jul 2006, 23:15
by hollowsoul
emmm typo srry about that will send a fixed one in a sec
Update:- its fixed
btw it would be nice to post an error u encoutered plz. So i am aware of it & can help other peep know there is a typo etc.
around 6 peep downloaded it & only 1 told me about it in irc (was afk for awhile, although check on forums & saw nothing on forums using friends computer)
Posted: 14 Jul 2006, 00:56
by hollowsoul
Apparently spring doesnt like whitespaces in .springrc

Will release fix tomorrow (aint got time atm)
edit skirmish.py
and comment out this line
Config.save(self,Global.CONFIG_FILE,Global.CONFIG_FILE_TEMP) #FIX??
i.e
# Config.save(self,Global.CONFIG_FILE,Global.CONFIG_FILE_TEMP) #FIX??
That will stop app from saving a bad config file. Srry about that
Posted: 14 Jul 2006, 20:07
by hollowsoul
Released version 3.03
Only change is fixed issue with whitespaces.
Should work now
Plz post any bugs u encouter
gtg out bbl. But quick test was only 4 lines added to code.
Spring works with the new config, i.e resolutions etc
Although i havin problems gettin it to work with fullscreen but that is related to my spring svn install somehow. Since a config from another machine that starts up in fullscreen. Only starts in windowed on other machine = weird.
Posted: 15 Jul 2006, 05:10
by keithjr
Small suggestion, organize the list of user-end things-to-do to get the app running (on the first post), it's a little scattered :)
Also, I got spring via fbo's package, so I don't have the unitsync.so file you speak of. I also have the source files but since I'm on linux, the vcproj file that organizes the unitsync folder isn't very useful to me. Guess I'll have to figure out how to compile from svn now...gr...
Posted: 15 Jul 2006, 07:30
by Word
just checkout the newest svn cd into it then do scons omni then go in and find unitsync.so
Some comments
Posted: 15 Jul 2006, 10:56
by fbo
Hi everybody,
sorry about being so quite for the last days. I've been very busy at work which was eating so much time that I wan't able to either read or write anything here.
First of all: Impressive work, hollowsoul
I heard about my scripts being badly documented. Here are some details, you might consider worth reading.
http://fbo.no-ip.org/cgi-bin/twiki/view ... al_details
Please tell me, if you need help packaging the GUI or if you consider using the debspring content download concept.
fbo
Posted: 15 Jul 2006, 18:37
by keithjr
Code: Select all
File "/usr/bin/spring-gui", line 132, in ?
os.chdir(Global.SPRING_DATADIR)
OSError: [Errno 2] No such file or directory: '/usr/share/games/taspring-linux-svn'
I was under the impression from previous posts that this gui would work with the debspring package. Although upon further review I guess this qualifies as a "Edit Global.py" thing.
EDIT:
Okay, I set up all the directories and now I get this.
Code: Select all
keithjr@helios:~$ spring-gui
Segmentation fault
Ouch. I'll try running a trace or something. Sigh.
EDIT 2:
OKAY FIXED IT: fbo's debspring users need to make sure they use the .springdir/localhost.localdomain.0:0 (or whatever is there) directory as the spring data dir, NOT the one in /usr/share, when editting global.py
Posted: 15 Jul 2006, 20:33
by hollowsoul
Pretty much, thats why i got it setup so u got to edit GLOBAL.py before u can run script atm
Working on adding support to detect depspring install / gentoo ebuild atm (since got the details on how it works now), and automatic set it up for gentoo / depspring peep so no editing on GLOBAL.py required
Its a weird setup method, but it works including its nice feature to download maps / mods & install them. Seeing about making a front-end for that
Note :- the delay between loading pygtk & changin mods has been decreased a fair bit. (i.e for changin mods close to 1/12 time it takes atm, was slow cause i rushed added that feature, its properbly coded now & will be in next release)
edited:- It didnt work before for debspring before cause, need to make a symlink in $HOME to datadir/.springrc so when u started skirmish. (There was something else but u dont need it anymore). When i got this sorted out, u prob got impression it works for depspring without needed to edit GLOBAL.py
Posted: 16 Jul 2006, 01:00
by hollowsoul
Gonna need some volunteers tomorrow morning ish.
If u using depspring
If u about & i havent released a new version.
Give me a pm plz (around 2 pm GMT)
Will need to test depspring detection tomorrow.
When all done u will just need to edit GLOBAL.py to tell it where pygtk app is installed, nothing else. App will detect all the rest aslong u using svn build / gentoo ebuild / debspring (fbo packages)
Changes so far are
Player Name & Sound Volume added to options menu
Reduced mod sides loading time (should speed app alot compared to last release)
Pygtk app temporary files / config files / script.txt all reside under $HOME/.spring-gui. Thus more multi-user friendly now.
Automatic detection of Gentoo & Depspring (depspring will need testing, since i dont have debian system)
For svn ebuilds easiest thing todo is to create /etc/spring/datadir with the path to datadir inside it i.e /usr/share/games/taspring
Bug reports aswell, if i seem to have ignored it. Bug me again i.e PM / IRC.
Update:- The poll is cause i really want some feedback, instead of look @ list of things todo & not knowing where to start.
Posted: 16 Jul 2006, 12:28
by clericvash
Please remember if you are creating a GUI for something FBO has done, only people on debian based systems will be able to use it!
Ps. i voted for chat :)
Posted: 16 Jul 2006, 12:44
by hollowsoul
aware of that.
New release has $HOME/.spring-gui
to store temp files & config files i.e
Example of automatic made setup file for pygtk on a gentoo system (user that ran it was deco) is
Code: Select all
[MAIN]
SPRING_DATADIR = /usr/share/games/taspring-linux-svn
BACKGROUND = /home/deco/.spring-gui/background.jpg
SPRING_CONF_TEMP = /home/deco/.spring-gui/springrc-temp
SPRING_SCRIPT = /home/deco/.spring-gui/script.txt
SPRING_MAP_PREVIEW = /home/deco/.spring-gui/map-preview.tga
STARTUP = 1
SPRING_SCRIPT_TEMP = /home/deco/.spring-gui/script-temp.txt
INSTALL = GENTOO
SPRING_CONF = /home/deco/.springrc
i.e using INSTALL = distro
Can add conditions to add stuff dependin on how taspring was installed.
Posted: 16 Jul 2006, 14:23
by hollowsoul
Ok this is getting annoying now
Out of all the peep that downloaded app i got like 2-3 peep that have pointed out bugs.
If i gonna code this would be nice to have peep who download & test out Spring-GUI (will be new name after next release).
TO ACTUALLY REPORT BUGS !!!!!!!!!!!!!!!!!!!!!
It takes like 2-3 minutes to post it on forums, say whats not working & if it dies outto console. copy/paste the error.
Points leading up to this anger is
Incase u wondering, config didnt save in right format till around 3.xxx. Since spring doesnt like whitespaces. While one person posted it as a bug, i completey a) forgot about it b) it got lost in forum posts. Wasnt till someone pointed it out in irc, untill it got fixed
Did u know that current release has the sides hardcoded ? Will be fixed next release, only noticed it when was going through the code. How did noone notice this ?
And if u are wondering my AI is completey broken using latest SVN & tryin to find out why. So cant use skirmish to much atm