View Issue Details

IDProjectCategoryView StatusLast Update
0000262Spring engineGeneralpublic2007-04-02 08:12
Reporteracidd_uk Assigned ToILMTitan  
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Summary0000262: Gradual and chunk reclaim
DescriptionSee these forum threads:

Feature suggestion: http://taspring.clan-sy.com/phpbb/viewtopic.php?t=6134
Dev thread: http://taspring.clan-sy.com/phpbb/viewtopic.php?t=6242
Additional InformationThis patch allows for the mod maker to choose 3 possible relcaim modes and also allows for selectable multi-reclaiming (ie effective reclaiming by several units at once).

A new (optional) .tdf is added to the mod: gamedata/reclaim.tdf

This tdf has one main section "RECLAIM" within which;
  multiReclaim = 0 or 1 to allow only 1 or >1 unit to simultaneously reclaim a feature/corpse
  reclaimMethod = 0, 1 or n (int n>1)
    0 is gradual reclaim (ie a small % is reclaimed every tick)
    1 is current behaviour - ie one large hit of resources at the end of the reclim period
    n is chunky behaviour - reclaim happens in n equal sized chunks

Please note, this patch is currently only submitted for comments - it is not rready to be submitted due to a potential exploit regarding partial reclaim and resurrection. I am in the process of fixing this, once it's done I will update this patch and it should be ready for submission.
TagsNo tags attached.
Attached Files
gradual-reclaim-0.1.patch (Attachment missing)
gradual-reclaim-0.2.patch (Attachment missing)
gradual-reclaim-0.3.patch (Attachment missing)
Checked infolog.txt for Errors

Activities

jcnossen

2006-08-04 14:53

reporter   ~0000312

Last edited: 2006-08-04 14:56

I think it's best to keep game related code out of the feature handler, or more important keep the global "game rules" in a single place. I just added a CModInfo class, which you can store the global reclaiming info in. Other than that the code looks fine, just move the game code out of CFeatureHandler.

Also, before everyone starts adding a seperate tdf for every little thing, change reclaim.tdf into gamerules.tdf

acidd_uk

2006-08-04 19:01

reporter   ~0000313

Added v0.2.

Have just read jcnossen's comment, expect v0.3 in about 30 seconds...

acidd_uk

2006-08-04 19:05

reporter   ~0000314

Uploaded v0.3. This is a release candidate.

Rezzing units that have been partially reclaimed is now added, along with some code to stop a chunk reclaim + rezzing exploit.

I have not been able to test this new functionality, since at the time of writing the current version of Spring in SVN doesnt draw my mouse pointer :-( However, the reclaiming code was tested in single player vs bots and multiplayer between remote computers, so there shouldnt be any sync issues.

jcnossen

2006-08-05 02:07

reporter   ~0000315

committed, thanks!

acidd_uk

2006-09-28 22:33

reporter   ~0000397

The TDF used has changed, it is actually: modrules.tdf,

ILMTitan

2007-04-02 08:12

reporter   ~0000856

Committed a long time ago.

Issue History

Date Modified Username Field Change
2006-08-02 20:55 acidd_uk New Issue
2006-08-02 20:56 acidd_uk File Added: gradual-reclaim-0.1.patch
2006-08-04 14:53 jcnossen Note Added: 0000312
2006-08-04 14:56 jcnossen Note Edited: 0000312
2006-08-04 19:00 acidd_uk File Added: gradual-reclaim-0.2.patch
2006-08-04 19:01 acidd_uk Note Added: 0000313
2006-08-04 19:05 acidd_uk Note Added: 0000314
2006-08-04 19:06 acidd_uk File Added: gradual-reclaim-0.3.patch
2006-08-05 02:07 jcnossen Status new => closed
2006-08-05 02:07 jcnossen Note Added: 0000315
2006-08-05 02:07 jcnossen Resolution open => fixed
2006-09-28 22:33 acidd_uk Status closed => feedback
2006-09-28 22:33 acidd_uk Resolution fixed => reopened
2006-09-28 22:33 acidd_uk Note Added: 0000397
2007-04-02 08:12 ILMTitan Status feedback => resolved
2007-04-02 08:12 ILMTitan Resolution reopened => fixed
2007-04-02 08:12 ILMTitan Assigned To => ILMTitan
2007-04-02 08:12 ILMTitan Note Added: 0000856