Login  Register
 



Post new topicReply to topic Go to page Previous  1, 2, 3, 4, 5, 6  Next
 
Author Message
 PostPosted: 29 Aug, 2011 
 
Forum Scout
Forum Scout
User avatar

Joined: 18 Feb, 2007
Posts: 493
Location: Gone
Offline
Hello again.

venomdragoon got in contact with me (PM's go to my email). I'm really happy to see someone finally take the challenge. I've always said I'd be happy to help anyone who put in the effort to understand the basics but I never expected it to take 2 years for someone to take it up! Oh well, if I'd known back then I would have done more but that's hindsight.

I also never expected it would be done by somebody who has never used Lua, let alone written a Lua mod for supcom (two quite distinct skills). Yes I wrote 95% of it but then I also had the benefit of several earlier lua mods under my belt. venomdragoon has really jumped into the deep end here and come out on top. As he said, this is an extremely complicated mod (in several places it interacts directly with undocumented engine internals) - yet he only contacted me AFTER he fixed the mod, I didn't help him at all.

Gotta respect that.

Anyway, I'm happy to assist where I can with the limitation that I don't have Supcom (or even Windows) installed. I can still offer advice and hosting though if needed.

_________________
I have left the community. To adopt one of my mods (Advanced Coop, Multiplayer Save, Advanced AI) or tools (Advanced Utils, Mod System Patch, Mod Installer) please PM me or visit http://warriorhut.org/forged_alliance


Top
 Profile  
 PostPosted: 30 Aug, 2011 
 

Joined: 30 Oct, 2008
Posts: 2626
Offline
I'm very impressed by this.
By all accounts that was a very difficult mod to get fixed.

Thank you very much!

_________________
Regarding Supcom 2:
Ghaleon wrote:
and wtf, now i have to upgrade everything BUT mexes? great ...


Top
 Profile  
 PostPosted: 30 Aug, 2011 
 

Joined: 28 Aug, 2011
Posts: 8
Offline
Howdy there Spliff,
If you want to host that version up on your site, that would probably help more people out as I'm sure that's where people go to download it. Hell, that's where I originally found it last week.

I also put in a request to have it uploaded to filefront in the supcom mods section.

As an update I tested it out on 3603, and it works fine still.

About questions, the only thing still bugging me is the lack of missile/enhancement save progress, but as you said, all this stuff is undocumented. If anyone has any suggestions on how to change the progress of enhancement upgrading or missile building, I would love to hear it. The only known method to me (Spliff's original method ) is forking a separate thread that continually checks progress in the background, this is not ideal since it gives incorrect feedback to the user, and I am trying to minimize background threading since supcom is pretty shitty with threads in the first place


Top
 Profile  
 PostPosted: 30 Aug, 2011 
 
User avatar

Joined: 20 Apr, 2007
Posts: 1524
Location: VT, USA
Offline
There has to be a way to check its progress at any given moment, otherwise the UI wouldn't be able to show the progress bar. If you can track down where the UI gets its data from for the progress bar, that could probably be used for querying at the moment of saving.

Then you'll just have to find a way to initiate and advance the build progress from the unit without expending the resources all over again.

_________________
Nuke/Shield Collide Mod topic thread
My Mods


Top
 Profile  
 PostPosted: 30 Aug, 2011 
 

Joined: 28 Aug, 2011
Posts: 8
Offline
Oh I can save the progress fine, I just can't reset it on load, I should have clarified that.
The missile launcher has none of the usual links (unitUnderConstruction, or focusUnit), setWorkProgress does not work, and onSiloStartBuild just sets a reference to its weapon. Following the weapon's scripts leads to a dead end. Enhancements are in the same boat.

Another update, the mod is now hosted here as well:
http://supremecommander.filefront.com/f ... V11;119793


Top
 Profile  
 PostPosted: 30 Aug, 2011 
 
User avatar

Joined: 19 Jul, 2009
Posts: 2972
Offline
SetWorkProgress only updates the yellow progress bar. However, enhancement progress is handled in lua by the ScriptTask system, namely /lua/sim/tasks/EnhanceTask.lua. It should be as simple as kicking off the enhance task (I'm not actually sure how to do this from the sim, but IssueScript with the same parameters that the UI uses in construction.lua should work) and then overriding unit.WorkProgress to the appropriate fraction once you've confirmed that the enhancement task has begun (which should be any time after WorkProgress is set to 0 by OnWorkBegin).

You may be SOL with silo build, since as far as I can tell, they don't actually build a physical object, and the build process is handled mostly by the engine. There is some build cost calculating done in the lua I think, in Unit.UpdateConsumptionValues, so it may be possible to selectively prorate the cost of a missile build by the progress of the pre-save missile build progress (however you're determining that), but I'm not sure.

Edit: Yes, it should be possible to report different economy values to simulate resuming a projectile. There are a variety of ways to do it, but hooking /lua/game.lua:GetConstructEconomyModel and looking for targetData.Categories and table.find(targetData.Categories, 'PROJECTILE') along with whatever resume data you have saved on or transferred to the unit should give you a simple, non-destructive way to detect a resume projectile build, and report prorated economy values.


Top
 Profile  
 PostPosted: 30 Aug, 2011 
 

Joined: 28 Aug, 2011
Posts: 8
Offline
Thanks Mithy, I will definitely try out your suggestions.


Top
 Profile  
 PostPosted: 30 Aug, 2011 
 

Joined: 03 Jun, 2007
Posts: 793
Offline
Tried this mod tonight, and found some apparent issues:

1) When using this with BlackOps ACUs, the ACU unit (except for seraphim) doesn't appear visibly and I'm unable to select the unit. It appears this mod doesn't work with BlackOps ACUs?

2) When restoring the game, all rocks and trees on the map disappear. Not sure why the map would be affected...

3) When running this mod with BlackOps and BlackOps ACUs, 'some' of the animation effects are no longer present, for example, the cybran hydrocarbon no longer has smoke coming from the unit. T1 energy and mass units have no animation.

I love the idea of this mod; hopefully there's a way to make it work with the BlackOps and BlackOps ACUs?

Thanks


Top
 Profile  
 PostPosted: 30 Aug, 2011 
 
User avatar

Joined: 19 Jul, 2009
Posts: 2972
Offline
As always, pastebin a log whenever you run into mod compatibility issues. That makes it much easier and faster to find them.


Top
 Profile  
 PostPosted: 31 Aug, 2011 
 

Joined: 28 Aug, 2011
Posts: 8
Offline
@HTKatzmarek:
About your blackops problems, I'll try and test it out on that mod. You can actually debug the game yourself if you run the game with logging enabled. Make a shortcut that goes: ..bin/forgedalliance.exe /log "log.txt" (then run as administrator and check your bin folder) the log will most likely tell you what failed and where as to give us a better idea where to look.
I suspect the problem lies in the order of file hooking, since this mod does hook a couple of files.

The trees and rocks disappear for two reasons:
1. Loading units on top of props can be ugly (props are different every map load) so all props are cleared before a load happens.
2. Saving every prop on the map is a very lengthy process (my quad core phenom takes ~10 mins), whereas ignoring them saves in about 3 seconds. If this is a big issue for people, I can upload a version that saves every tree and rock, but I figure by that time in a game reclaiming trees and junk is not worthwhile. This mod is designed more as a backup just in case someone crashes, desyncs, or your house caught fire, then you have the chance to reload your game to about 99% where it was.


Top
 Profile  
 PostPosted: 31 Aug, 2011 
 

Joined: 03 Jun, 2007
Posts: 793
Offline
I'll try to find some time this weekend to test further, and get a log file. How do I go about using 'pastebin' to post the log?

I'm also going to try changing the mod's UID so that it loads before the BlackOps, and see if that helps.

Regarding the trees and rocks, it's not a big deal, just something I noticed. Any chance of a configuration file where that could be enable if wanted?

Thanks


Top
 Profile  
 PostPosted: 31 Aug, 2011 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
Its easy to use pastebin. Just boot up pastebin, Post your stuff there, submit it, then give us the link of that page.


Top
 Profile  
 PostPosted: 31 Aug, 2011 
 
User avatar

Joined: 19 Jul, 2009
Posts: 2972
Offline
http://www.pastebin.com

Paste text, copy URL, paste the URL into a post here. You don't need to register.


Top
 Profile  
 PostPosted: 31 Aug, 2011 
 

Joined: 03 Jun, 2007
Posts: 793
Offline
I did another test tonight. I updated the UIDs in both mods, to ensure that they loaded before the BlackOps ACUs. Everything worked great! :D
So in a future release, maybe change the UIDs so that these mods load before BlackOps?

I do have a few minor issues to report...

1) If the BlackOps ACUs are in the middle of an upgrade when the save is performed, that upgrade state is not saved. I'm guessing that the upgrade state would probably be saved on a 'normal' ACU, but this mod isn't addressing the new units for the BlackOps ACUs? Any chance of getting that added?

2) Factory rally points are not saved and revert to the default.

I've not played a full game yet, only testing with 2-4 minutes of game time. So I'll report my results once a complete game is finished using this save mod.

These are minor issues, and overall, this is really a great mod! Thanks


Top
 Profile  
 PostPosted: 31 Aug, 2011 
 
Forum Scout
Forum Scout
User avatar

Joined: 18 Feb, 2007
Posts: 493
Location: Gone
Offline
@HTKatzmarek: There is actually a way to explicitly load a mod before/after another mod. It didn't used to work (i wrote a Mod Support patch that fixed it) but maybe GPG fixed it after I left.

@venomdragoon: If you do feel the desire to do more work on this I'd suggest not focusing on enhancements/missiles but instead consider porting the order tracking code from v2. I know the methods I used are pretty kludgy but losing your chained orders, ferry chains, movement waypoints and patrol routes after each load is pretty annoying - especially during a long-running game with 1000's of units.

The v2 order code was actually working very well with the single exception that restoring orders to units currently being built seems difficult or impossible. It isn't hard to simply ignore those units though (I was too obsessed with that one limitation to let it go - but in hindsight it simply wasn't important enough to justify the time I spent on that one exception).

If you decide to look into it the code you're looking for is the stuff that hooks IssueCommand (there's one for the sim and one for UI). There's also some code that cleans up after cancelled orders and probably some minor changes to the main save/load functions.

In fact if you port your v1.1 fixes to v2 and disable restoring orders to incomplete units you'll probably have a working mod right there.

_________________
I have left the community. To adopt one of my mods (Advanced Coop, Multiplayer Save, Advanced AI) or tools (Advanced Utils, Mod System Patch, Mod Installer) please PM me or visit http://warriorhut.org/forged_alliance


Top
 Profile  
 PostPosted: 31 Aug, 2011 
 
User avatar

Joined: 19 Jul, 2009
Posts: 2972
Offline
spliff wrote:
@HTKatzmarek: There is actually a way to explicitly load a mod before/after another mod. It didn't used to work (i wrote a Mod Support patch that fixed it) but maybe GPG fixed it after I left.

No, it does not work. Yours must have been lost, because someone else recently wrote a fix for it-- however, since it's necessarily an .scd mod, and all newer mods are mod-manager compatible, it actually causes more problems than it solves in the form of load-order desyncs when someone in a multiplayer game doesn't have it.


Top
 Profile  
 PostPosted: 01 Sep, 2011 
 
Forum Scout
Forum Scout
User avatar

Joined: 18 Feb, 2007
Posts: 493
Location: Gone
Offline
Mithy wrote:
Yours must have been lost, because someone else recently wrote a fix for it-- however, since it's necessarily an .scd mod, and all newer mods are mod-manager compatible, it actually causes more problems than it solves in the form of load-order desyncs when someone in a multiplayer game doesn't have it.


viewtopic.php?f=7&t=28053

I'm 90% sure v2 of the patch is Vault-compatible and already in the Vault. Search for 'Mod Support' (UID "c14ddf83-6e71-425c-affb-4e39b25fb83e").

The original version did require a manual install (even came with an installer). It provided a range of fixes including the ability to hook frontend files from a vault mod.
http://www.warriorhut.org/forged_alliance/mod_support/

The Vault-compatible version is also in this archive:
http://www.warriorhut.org/forged_allian ... g/mods.zip

It might also have been added to the last release of the 'Advanced Utils' mod.

I recommended the fix to the Community Patch people but I don't think they ever included it.

Having said that, if changing the UID does the job then that's probably sufficient.

_________________
I have left the community. To adopt one of my mods (Advanced Coop, Multiplayer Save, Advanced AI) or tools (Advanced Utils, Mod System Patch, Mod Installer) please PM me or visit http://warriorhut.org/forged_alliance


Top
 Profile  
 PostPosted: 01 Sep, 2011 
 
User avatar

Joined: 19 Jul, 2009
Posts: 2972
Offline
What version of FA was this tested in? I don't even think the /shadow folder is enabled anymore - it was certainly broken at one point, although I haven't even tried it in the last versions (3599 and 3603).

Even so, adding a /shadow folder to your mod folder certainly didn't enable pre-launch shadowing or hooking of the lobby, etc, as the /shadow and /hook folders aren't touched outside of RuleInit until the session is actually launched. If this works, that's fantastic, but everything I know and have tried says otherwise.


Top
 Profile  
 PostPosted: 01 Sep, 2011 
 
User avatar

Joined: 20 Apr, 2007
Posts: 1524
Location: VT, USA
Offline
It'd be great if that worked better. I was the someone else that came up with a patch for it. Was driving me nuts....

_________________
Nuke/Shield Collide Mod topic thread
My Mods


Top
 Profile  
 PostPosted: 01 Sep, 2011 
 

Joined: 03 Jun, 2007
Posts: 793
Offline
FuryoftheStars wrote:
It'd be great if that worked better. I was the someone else that came up with a patch for it. Was driving me nuts....


Fury, if I use your load order mod to solve this issue, do I need to make this into a .scd file, and then ensure that it loads first to do it's job?


Top
 Profile  
 PostPosted: 01 Sep, 2011 
 
User avatar

Joined: 20 Apr, 2007
Posts: 1524
Location: VT, USA
Offline
No, it's the modloadorderfix mod that is the scd. Everything else can remain in its natural state.

_________________
Nuke/Shield Collide Mod topic thread
My Mods


Top
 Profile  
 PostPosted: 01 Sep, 2011 
 

Joined: 03 Jun, 2007
Posts: 793
Offline
OK, thx. I've moved the discussion about your mod to your mod thread, to not plug up this thread with that discussion.


Top
 Profile  
 PostPosted: 01 Sep, 2011 
 

Joined: 28 Aug, 2011
Posts: 8
Offline
@Spliff-
Yeah I read through all of V2 last week before starting the fixes on V1, I have a good idea how your system works, and if I get around to it I'll definitely pick it up.
I'm pretty happy with the state of V1 (stable, no extra threads, and restores most of a game state) right now its gonna be a back burner project.


Top
 Profile  
 PostPosted: 02 Sep, 2011 
 

Joined: 03 Jun, 2007
Posts: 793
Offline
I think I've found another issue. I tried this with a AI player today, and when I loaded the save game, the AI's units all just stood there, and didn't do anything. It seems like all of the AI's orders were gone, and it didn't do anything new.

Has this been tested with AIs, and should it work with AIs?

Thanks


Top
 Profile  
 PostPosted: 02 Sep, 2011 
 
User avatar

Joined: 19 Jul, 2009
Posts: 2972
Offline
I can't possibly imagine that the AI will function correctly after a multiplayer 'load'. From the AI's perspective, the game is starting from 0, and it's just getting a bunch of free units, the majority of which it doesn't know what to do with because they're not in the places it usually looks for units with which to form platoons. The skirmish/MP AI also makes a ton of assumptions about the start of the game and how it should behave, what it should build, etc all of which will be invalid in a loaded game.

You'd have to specifically re-code the AI to handle a loaded game, have it look through all of its units and add them to platoons, handle factory callback setups, etc. It would be a big process.


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic Go to page Previous  1, 2, 3, 4, 5, 6  Next



Quick Tools

Search for:
Jump to:  

© 2002-2010 Gas Powered Games Corp. All Rights Reserved. Gas Powered Games is the exclusive trademark of Gas Powered Games Corp.
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
 
Home| Games | Company | News & Press | Support
  Terms of Use   |    Copyright Information   |    Privacy Policy