SaveGame v. 0.6 - Page 4

SaveGame v. 0.6

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

Moderator: Moderators

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

Re: SaveGame v. 0.2

Post by zwzsg »

I just fixed my code to translate unitid and succesfully restored a guard command. (At frame 5).
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: SaveGame v. 0.2

Post by Argh »

Well, you aren't recording anything like the size of these states, which causes some other issues.

And please get rid of your 2K of junk code for parsing everything into the startscript. You just need to use gsub and a function to parse an entire table into there (not that I think that writing savegame data directly into a start-script was an elegant strategy in the first place).

And, basically, stfu and don't post here, because your refusal to do anything useful is why I burned a week on this project, and I'm not interested in anything you have to say anymore.

Anyhow, it works on frame 32 now. New version here in a few moments.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: SaveGame v. 0.2

Post by zwzsg »

Argh wrote:your refusal to do anything useful
:?:
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: SaveGame v. 0.2

Post by Argh »

Here is version 0.3. All orders seem to be properly preserved at this point.
Attachments
SAVEGAMES.sdd.zip
(382.01 KiB) Downloaded 19 times
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: SaveGame v. 0.2

Post by FLOZi »

zwzsg wrote:
Argh wrote:your refusal to do anything useful
:?:
I think he finally lost his mind altogether. :shock:
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: SaveGame v. 0.3

Post by Forboding Angel »

Would you guys please just put the dicks away and help each other? ffs

This forum needs a "Mandatory Masturbation before posting" rule.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: SaveGame v. 0.3

Post by AF »

That kind of accusation belongs in pm, if only because it threatens to derail this thread.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: SaveGame v. 0.3

Post by Argh »

Version 0.4:

Writes all Units during GameStart(), all Commands appear to be now working, written to game state on frame 35 (which is about when the end-user catches up with loading). IOW, no annoying period where we can see the Units that we don't want (no duplicate Commanders, etc.). I've tested this with 100 units guarding another unit on a lengthy Patrol path, on WB maps with lots of other things assigned a lot of Commands; this appears to be working about as well as it can.

I haven't heard anybody's testing results with craters, etc., so I'm going to assume that part's working until I hear otherwise.

One last version will show a "game loading" screen until frame 1 is over, so that we don't see the ugly empty map, but only see it once objects have been placed in the gameworld by the scripts. I'll get to that tomorrow; short of anything else that seems vital, it's feature-complete at that point and mainly just needs to be tested, but it's been pretty solid over here thus far.
Attachments
SAVEGAMES.sdd.zip
(382.04 KiB) Downloaded 20 times
SeanHeron
Engines Of War Developer
Posts: 614
Joined: 09 Jun 2005, 23:39

Re: SaveGame v. 0.4

Post by SeanHeron »

Sounds like great work! I'm afraid I don't think I'll be testing this week (or next), but I know for sure this is going to be handy for stuff I want to do (sooner or later).
R-TEAM
Posts: 177
Joined: 22 Jan 2009, 19:25

Re: SaveGame v. 0.4

Post by R-TEAM »

Hi,

how i can use his on abandoned game mods ...
Only depack - copy the files from the ssd in the mod dir and repack
or musst i change anything more ?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: SaveGame v. 0.4

Post by Argh »

All you need to do is unpack the zip to your /mods directory, open the old game, and add "SAVEGAME.sdd" to the list of dependencies in Modinfo.lua (if the game is really old and hasn't converted it from modinfo.tdf, then you'll have to convert it, post it up if you're stuck).

That's it, basically. You don't have to put it into the mod / game at all.
R-TEAM
Posts: 177
Joined: 22 Jan 2009, 19:25

Re: SaveGame v. 0.4

Post by R-TEAM »

Hi,

its dont work.
infolog:
writing save!
LuaRules::RunCallIn: error = 2, RecvLuaMsg, [string "LuaRules/Gadgets/writesave.lua"]:30: attempt to concatenate a function value

spring:
spring_0.81.0-60-g3683895

mod:
REVELATION R60
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: SaveGame v. 0.4

Post by Argh »

Hrmm. I don't have that error here, but that's in the GG section, so it may still have issues. I'll run a couple of tests.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: SaveGame v. 0.4

Post by Argh »

Try adding these two files to LuaRules (not Gadgets). I left them out of this project because I presumed that projects would have this file.

I just tested with GG stuff, worked fine over here, so I'm wondering if not having those files means that GG returns nil.

Meanwhile, I'll download that game and see whether I can duplicate this error.
Attachments
draw.lua
(53 Bytes) Downloaded 18 times
main.lua
(100 Bytes) Downloaded 19 times
R-TEAM
Posts: 177
Joined: 22 Jan 2009, 19:25

Re: SaveGame v. 0.4

Post by R-TEAM »

Hi,

Nope - the same error ....
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: SaveGame v. 0.4

Post by Argh »

Yeah, figured out what the problem is... the solution may be a bit trickier. It's choking when the type returns a function.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: SaveGame v. 0.4

Post by Argh »

Got it, I think. Try this.
Attachments
WriteSave.lua
(13.85 KiB) Downloaded 107 times
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: SaveGame v. 0.4

Post by Argh »

OK, I got that working, Morph Gadget was a bit of a pain to trace.

Still seeing an issue with reload- there's a weird Com Ends logic problem caused by a Gadget; it'll take a little bit to figure out an appropriate workaround.
R-TEAM
Posts: 177
Joined: 22 Jan 2009, 19:25

Re: SaveGame v. 0.4

Post by R-TEAM »

Hi,

works now "more" - but no sucess ;)

infolog:
[ 357] writing save!
[ 357] found table
[ 357] found table
[ 357] found table
[ 357] found table
[ 357] LuaRules::RunCallIn: error = 2, RecvLuaMsg, [string "LuaRules/Gadgets/unit_morph.lua"]:168: attempt to index local 'morphData' (a nil value)
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: SaveGame v. 0.4

Post by Argh »

Sorry, I haven't released that update yet.

Hold on, I'm still tracking the loading bug. It's something wrong with main.lua in the game, which is some ancient copy of CA's main instead of Spring's current. Cutting it out == most of the stuff working, leaving it == no reload. Pretty annoying, but that's curable.
Post Reply

Return to “Lua Scripts”