SaveGame v. 1.4 (my epeen is bigger!!) - Page 2

SaveGame v. 1.4 (my epeen is bigger!!)

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: SaveGame v. 1.4 (my epeen is bigger!!)

Post by Forboding Angel »

very_bad_soldier wrote:
d_b wrote:yeah well, its also my epeen as well. i try to make all my code from scratch, so other people dont whine at me for credit.

EDIT: For example car repairer whined at me for weeks because his stupid "selectionsend" lua was in ANTS.
So you implement everything from scratch because you refuse to give credits where it is appropriate? Interesting approach, sir.

Btw you should include "LuaUI/Images/AlliedCursors.png" for the allied cursor widget. Sorry did forget to upload it to widget db myself, but its fixed now.
Moreso, it's tough to keep everything straight. I just keep credits in the widget intact, but if I were asked me make a list and post it somewhere my response would probably be to piss off and look in svn because it would be annoying and time consuming.

I imagine trib was probably being asked to display credit somewhere other than the widget/gadget file.
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: SaveGame v. 1.4 (my epeen is bigger!!)

Post by CarRepairer »

Forboding Angel wrote:
very_bad_soldier wrote:
d_b wrote:yeah well, its also my epeen as well. i try to make all my code from scratch, so other people dont whine at me for credit.

EDIT: For example car repairer whined at me for weeks because his stupid "selectionsend" lua was in ANTS.
So you implement everything from scratch because you refuse to give credits where it is appropriate? Interesting approach, sir.

Btw you should include "LuaUI/Images/AlliedCursors.png" for the allied cursor widget. Sorry did forget to upload it to widget db myself, but its fixed now.
Moreso, it's tough to keep everything straight. I just keep credits in the widget intact, but if I were asked me make a list and post it somewhere my response would probably be to piss off and look in svn because it would be annoying and time consuming.

I imagine trib was probably being asked to display credit somewhere other than the widget/gadget file.
Actually if anyone knows Tribulex at all they'd know this is a skewing of the truth, there was no "whining for weeks."

It was a single incident where he was in a springie one day, bragging about how he doesn't need any code from CA and I proved him wrong by displaying the link to the SVN in his trac page which in fact contained several of such widgets. In conclusion, you suck.
User avatar
Tribulex
A.N.T.S. Developer
Posts: 1894
Joined: 26 Sep 2009, 21:26

Re: SaveGame v. 1.4 (my epeen is bigger!!)

Post by Tribulex »

lol.


well anyway my epeen is still bigger my gui is faster
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: SaveGame v. 1.4 (my epeen is bigger!!)

Post by zwzsg »

New version:
- Now depends on BA712.sd7 instead of BA71.sd7
- You can quit the single player menu by pressing esc twice even when Spring.exe is direct launched. (First esc disable the background, second esc disable the menu, third esc bring back the menu)
- Does not disable every other widget when Spring is direct launched anymore. (I used to do that because I used to consider that no game started by direct running Spring.exe would be playable anyway, and some widgets were showing through the background picture supposed to hide that there even was a game going behind. It did not do that when the menu was brought midgame by pressing esc, even in older versions.)
- Better text file displayer: use mousewheel, does line wrap, ...
- Use tab in addition to arrow keys and mouse to navigate. (Still lacking shift-tab though.)
- Remember when you started a mission so clicking restart doesn't turn it into a skirmish.
- Probably some other random fixes I forgot.

Edit (2/3/10):
- Fix about Mapname tag in startscript, to now handle both 0.81.2 and 0.81+.
Attachments
BAV7.12-sav1.54.sd7
Requires BA712.sd7. Add savegames (and one mission) to BA.
(94.79 KiB) Downloaded 240 times
R-TEAM
Posts: 177
Joined: 22 Jan 2009, 19:25

Re: SaveGame v. 1.4 (my epeen is bigger!!)

Post by R-TEAM »

Hi,

after a little break i am continue testing ;)
Have played AdvBA 1.59 with map FolsomDammDeluxeV3.
Save/loading work basicaly, but the things that are in-build dont
get the right ready state (20% as example).
All beginning at 0% ready ....
Thats all i found ATM ;)
Will continue test ....
R-TEAM
Posts: 177
Joined: 22 Jan 2009, 19:25

Re: SaveGame v. 1.4 (my epeen is bigger!!)

Post by R-TEAM »

Hi,

after loading defferent game times i found more errors, special at later time ingame ...

The map generates rocks of metall, this rocks i have recycled.And have build on the free space a air fabric.After loading the rocks here again,and
partly IN the air-fab.

The build queue from builders (kbot/Vehicle/Commander) are NOT restored - the list is gone - only the actual building will build.

The ground get correct restored and wracks too ...
Have found that on fabs that build anything i get partly strange results:
The vehicle is twice in the fab with different "ready" states - one is at 4% the other at 10% .......
User avatar
prankster
Posts: 62
Joined: 31 Oct 2009, 12:35

Re: SaveGame v. 1.4 (my epeen is bigger!!)

Post by prankster »

Hello,

can u explain me how to use this script?

thanks =)
zwzsg wrote:New version:
- Now depends on BA712.sd7 instead of BA71.sd7
- You can quit the single player menu by pressing esc twice even when Spring.exe is direct launched. (First esc disable the background, second esc disable the menu, third esc bring back the menu)
- Does not disable every other widget when Spring is direct launched anymore. (I used to do that because I used to consider that no game started by direct running Spring.exe would be playable anyway, and some widgets were showing through the background picture supposed to hide that there even was a game going behind. It did not do that when the menu was brought midgame by pressing esc, even in older versions.)
- Better text file displayer: use mousewheel, does line wrap, ...
- Use tab in addition to arrow keys and mouse to navigate. (Still lacking shift-tab though.)
- Remember when you started a mission so clicking restart doesn't turn it into a skirmish.
- Probably some other random fixes I forgot.

Edit (2/3/10):
- Fix about Mapname tag in startscript, to now handle both 0.81.2 and 0.81+.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: SaveGame v. 1.4 (my epeen is bigger!!)

Post by zwzsg »

prankster wrote:Hello,

can u explain me how to use this script?

thanks =)
1) You put BAV7.12-sav1.54.sd7 next to BA712.sd7
2) You play the mod B.A. V7.12-sav1.54 instead of B.A. 7.12
3) Ingame, you press Esc for menu





R-TEAM wrote:the things that are in-build dont get the right ready state (20% as example). All beginning at 0% ready ....
[...]
Have found that on fabs that build anything i get partly strange results: The vehicle is twice in the fab with different "ready" states - one is at 4% the other at 10% .......
Yes. I can restore partially built stuff, but I cannot restore who was building it.

For mobile construction building static structure, that's usually not a problem: The constructor queue is restored, it sees that the next command is to build a structure, it finds an half complete nanoframe on where it's told to build, and so instead of starting a new building, it finishes the one it finds. That does not work when canAssist=0 but in BA and all other *A, cons are allowed to assit so that's okay.

For factories building vehicles, the partially built tank nanoframe is restored, but the factory doesn't remember that it was working on it. The factory ignore the restored vehicle nanoframe, and start a new one, while the old nanoframe slowly decay and vanish. That is why for factories, the construction restart at 0%, and why you see two nanoframes at different level of completion.

I asked the engine dev for a Lua command to re-assign a main builder, but it wasn't implemented. Then I understand that it would be tricky to code, and maybe less trickier to work around in my Lua by not spawning the frame but instead wait for the factory to initiate building and then bump the buildProgress.

R-TEAM wrote:The map generates rocks of metall, this rocks i have recycled.And have build on the free space a air fabric.After loading the rocks here again,and partly IN the air-fab.
Yes, I wipe and restore the features owned by a team, but not the gaia features. And indeed that means all the rocks and trees are back again when you reload, sometimes inside your buildings. Saving, wiping and restoring gaia features would be easy to add thought. Have not done it because I was afraid some maps have too many trees (but then now that I save heightmap, a few hundred trees wouldn't add that much save/load time and filesize), and to keep compatibility with Smoth's Feature Placer (but then I could just modify Feature Placer to perform at frame 2 instead of 10).

R-TEAM wrote:The build queue from builders (kbot/Vehicle/Commander) are NOT restored - the list is gone - only the actual building will build.
Hmm, right. It's odd that I had not noticed before. I guess I never went further that one item in cons queue in my testing.

R-TEAM wrote: continue testing [..] more errors
Other bugs that you have not found:
  • Fails to restore units with a - in their name.
  • Unit orientation incorrectly restored.
  • Doesn't play well with the timers and Regenerative AI I use in my missions: They get reseted.
  • Likes to replace people or unplayed teams with KAIK.
  • Does not translate Features ID: Potentially very dangerous!
User avatar
Tribulex
A.N.T.S. Developer
Posts: 1894
Joined: 26 Sep 2009, 21:26

Re: SaveGame v. 1.4 (my epeen is bigger!!)

Post by Tribulex »

replacing players with kaik is actually a really cool feature imo
burzuum
Posts: 3
Joined: 22 Jan 2007, 09:50

Re: SaveGame v. 1.4 (my epeen is bigger!!)

Post by burzuum »

Hello, i tried your script with BA 7.12 ... i got your Save menu so i clicked.

It just told me : Dump to <file.sav>

When i go in the Load menu, i have nothing.

Note : I have installed your script in my ~/.spring/mods directory. In my ~/.spring folder, i got the file.sav, which is here but unusable.

Have an idea ?

Thanks.

Burzuum (UBUNTU 9.10)
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: SaveGame v. 1.4 (my epeen is bigger!!)

Post by zwzsg »

Well, first after saving, check in the console or infolog that there was no error.
burzuum wrote:It just told me : Dump to <file.sav>
Can you search everywhere on all your drives for that file, and see if it was created, and where?

Lastly, maybe Spring Lua file writing is disabled on Linux builds?
burzuum
Posts: 3
Joined: 22 Jan 2007, 09:50

Re: SaveGame v. 1.4 (my epeen is bigger!!)

Post by burzuum »

zwzsg,

Thanks for your reply, and no, there is no error in the console when i click on the Save button ...
zwzsg wrote:Can you search everywhere on all your drives for that file, and see if it was created, and where?
Yes, the files are created but in the "~/.spring/" directory. Does they have to be in a special directory, like "Savegames" or else ?

Thanks,
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: SaveGame v. 1.4 (my epeen is bigger!!)

Post by zwzsg »

They were supposed to be created into /Savegames/BA/

Was this folder created?

And I just checked in my code, I use "/" not "\" so it's not that...
burzuum
Posts: 3
Joined: 22 Jan 2007, 09:50

Re: SaveGame v. 1.4 (my epeen is bigger!!)

Post by burzuum »

Got it ! You were right : it was the "BA" folder that was not created.

I created the "BA" folder in my home directory "~/.spring/Savegames" and it runs ok now !

I can save and load : COOL :))

Many thanks and very good job !
User avatar
ScarySquirrel
Posts: 82
Joined: 29 Apr 2007, 04:25

Re: SaveGame v. 1.4 (my epeen is bigger!!)

Post by ScarySquirrel »

If a newer version of Spring comes out, will missions I make with this think still be compatible with it? If there's an FAQ for this thing, that question needs to be on it.
I'm not making a single mission until I can be sure that the next version of Spring will not make it worthless.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: SaveGame v. 1.4 (my epeen is bigger!!)

Post by zwzsg »

Yes. It's part of KP now, And so I'll maintain it. A plus for long term survival is that it's not relying on an external .NET editor, it's just some Lua gadget & widget to read and write files in a TDF-like syntax. Then I'm of course at the mercy of dev removing file I/O Lua commands or let rot other Lua commands I'm about the only one to rely upon, such as Spring.Restart. Also there's what I wish to do, and what I actually take the time to do, I got so many unfinished, unimplemented, or started then unmaintained ideas, it's actually quite likely that a future version of Spring would break my system in a way that would be trivial to fix, that I would keep telling myself to go fix my stuff, yet postpone again and again, leaving it effectively broken. Also, I didn't take particular care into writing a well commented and easy to understood Lua code, so I am not sure about other people fixing it. Then it's still just some Lua, so nothing a coder couldn't understand.

Anyway, before you get your hope too hight, keep in mind that what I call "missions" is just: Play alone, /cheat /team as the AI, /give lotsa units, pause, enqueue orders, /team back as yourself, savegame, copy .sav file to /Missions/ folder. It doesn't have triggers, mid-game spawings, goals, briefings, or anything else you'd expect from an actual mission, that Mission Builder offered.
Post Reply

Return to “Lua Scripts”