Bug 5158 - Advanced Map Patch
Status: NEW
Alias: None
Product: Tremulous
Classification: Unclassified
Component: Misc
Version: SVN HEAD
Hardware: All All
: P3 enhancement
Assignee: Tim Angus
QA Contact: Tremulous Bugs
URL:
Depends on: 4959 5000 4998 5001 5004
Blocks:
 
Reported: 2011-08-06 02:41 EDT by /dev/humancontroller
Modified: 2011-11-12 08:33:53 EST
0 users

See Also:


Attachments
expose G_RoomForClassChange() (1.16 KB, patch)
2011-08-06 02:42 EDT, /dev/humancontroller
alter trigger wait timers a bit, remove duplicate code (4.08 KB, patch)
2011-08-06 02:42 EDT, /dev/humancontroller
allow maps to override buildpoint limits (2.79 KB, patch)
2011-08-06 02:43 EDT, /dev/humancontroller
mover team code defucktardization (18.03 KB, patch)
2011-08-06 02:44 EDT, /dev/humancontroller
multitarget support (15.32 KB, patch)
2011-08-06 02:44 EDT, /dev/humancontroller
allow movers to have >1 health, and be immune to specified attacks (9.39 KB, patch)
2011-08-06 02:45 EDT, /dev/humancontroller
functionality for players to use trigger_multiples by holding +buttons (1.48 KB, patch)
2011-08-06 02:46 EDT, /dev/humancontroller
new AMP entities (28.93 KB, patch)
2011-08-06 02:47 EDT, /dev/humancontroller
target_power and target_creep, power range logic rewrite (28.30 KB, patch)
2011-08-06 02:47 EDT, /dev/humancontroller
allow a special trigger to bring movers down manually (2.66 KB, patch)
2011-08-06 02:48 EDT, /dev/humancontroller
a trigger_hurt multiplexing attempt (1.46 KB, patch)
2011-08-06 02:49 EDT, /dev/humancontroller
add a string duplicating function into the game module (1.02 KB, patch)
2011-08-06 02:49 EDT, /dev/humancontroller
AMP DEBUG (12.53 KB, patch)
2011-08-06 02:50 EDT, /dev/humancontroller
AMP DEBUG PLUS (9.05 KB, patch)
2011-08-06 02:51 EDT, /dev/humancontroller
add an AMP compat hack for target_force_win (1.24 KB, patch)
2011-08-06 02:51 EDT, /dev/humancontroller
defucktardization amendment (868 bytes, patch)
2011-08-06 19:55 EDT, /dev/humancontroller
amendment for new AMP entities (717 bytes, patch)
2011-08-06 19:56 EDT, /dev/humancontroller
multitarget support amendment (965 bytes, patch)
2011-08-06 19:57 EDT, /dev/humancontroller
target_power amendment (728 bytes, patch)
2011-08-06 23:45 EDT, /dev/humancontroller
another multitarget support amendment (1.91 KB, patch)
2011-11-09 07:03 EST, /dev/humancontroller
another multitarget support amendment (1.83 KB, patch)
2011-11-12 08:33 EST, /dev/humancontroller

Description /dev/humancontroller 2011-08-06 02:41:31 EDT
here i dump some AMP patches that i'm not likely to continue working on.
Comment 1 /dev/humancontroller 2011-08-06 02:42:02 EDT
Created attachment 2898 [details]
expose G_RoomForClassChange()
Comment 2 /dev/humancontroller 2011-08-06 02:42:40 EDT
Created attachment 2899 [details]
alter trigger wait timers a bit, remove duplicate code

specifically, do not disable triggers for some if the triggering failed. the change's author is ==Troy==.
Comment 3 /dev/humancontroller 2011-08-06 02:43:20 EDT
Created attachment 2900 [details]
allow maps to override buildpoint limits
Comment 4 /dev/humancontroller 2011-08-06 02:44:04 EDT
Created attachment 2901 [details]
mover team code defucktardization

if there is any piece of Tremulous code that is retarded, it's the mover team code. when mover teams are used, then:
- the behaviour depends on which individual entity becomes the so-called team master, and (somewhat) as a result:
  - mover sounds are not played properly,
  - triggers are not triggered properly.
- stupid things happen when teaming different mover types (eg., func_bobbing + func_door + etc.).
- within one mover team, different mover movement times and wait times are not supported (contrary to what is "advertised"), causing prediction errors, abrupt mover teleportation, solidity of areas not matching the display, etc. whenever such mover teams are used.

as a reference, see the doors in compact-b1 and the large door and the conveyor movers in dryout_b5a.

in this patch, i attempt to fix some of the above issues.
- sounds should be played properly for all individual movers in a team.
- (in case of different movement times) a mover team is considered to have transitioned from one position to the other when all of the individual movers of the team have transitioned; the mover team starts returning from pos2 to pos1 after all of the individual movers have waited the defined amount after reaching pos2.

i am not confident about the correctness of this patch, but i am confident about the incorrectness of the current state of the code.
mover starting sounds being played for all mover of a mover team simultaneously may sound weird with the openal sound interface.
heterogenous teams are still not handled. teaming non-func_doors should probably be removed (protected against), anyway.
Comment 5 /dev/humancontroller 2011-08-06 02:44:43 EDT
Created attachment 2902 [details]
multitarget support

adds 3 additional spawn vars to specify additional targets: target2, target3, and target4.
adds 3 additional spawn vars to specify additional targetnames: targetname2, targetname3, and targetname4.
the idea (and the original implementation) is courtesy of ==Troy==.
Comment 6 /dev/humancontroller 2011-08-06 02:45:15 EDT
Created attachment 2903 [details]
allow movers to have >1 health, and be immune to specified attacks

the idea comes from ==Troy==.
Comment 7 /dev/humancontroller 2011-08-06 02:46:15 EDT
Created attachment 2904 [details]
functionality for players to use trigger_multiples by holding +buttons

the author of this change is ==Troy==.
Comment 8 /dev/humancontroller 2011-08-06 02:47:04 EDT
Created attachment 2905 [details]
new AMP entities

i will not attempt to document the workings (spawnflags, etc.) of the new entities.
originally by ==Troy==, now fully rewritten.
2 entity types are separated: target_power and target_creep, these will follow in a patch that "makes a lot of noise".
Comment 9 /dev/humancontroller 2011-08-06 02:47:49 EDT
Created attachment 2906 [details]
target_power and target_creep, power range logic rewrite

the introduction of these entities is followed by an attempt to alter the workings of power and creep zones to a well-defined method, which is then fully implemented.

the formal specification of the target_power entity and human power zones is:
- there are 4 types of target_powers:
  {master|non-master} target_power {reactor|repeater}
- each target_power has its own range setting for its (sphere shaped) zone
- terminology: the "small union" is the union of master target_power reactor
  zones, the "big union" is the union of the reactor zone and all
  (master/non-master) target_power reactor zones
- (master/non-master) target_power reactors extend the reactor's zone
  - in the big union, repeaters can't be built (existing repeaters blow up)
  - if there is a reactor, then the big zone is powered, and otherwise only
    the small zone is powered; in both cases, (human, non-support) buildables
    in the appropriate powered zone are powered opportunistically as governed
    by the following rule:
  - in the small/big union, at most g_humanbuildpoints worth of buildables are
    powered (in case of an excessive set of buildables, the powered subset is
    determined by some internal mechanism, but is guaranteed stabilize
    quickly; unpowered buildables blow up shortly)
- (master/non-master) target_power repeaters provide repeater-like local power
  - each target_power repeater has its own buildpoint setting (buildable
    repeaters have the setting at g_humanrepeaterbuildpoints)
  - a master target_power repeater is always said to be powered, a non-master
    target_power repeater (also, a repeater) is said to be powered if and only
    if there is a reactor
  - any (human, non-support) buildable outside the big zone, if in range of at
    least 1 power repeater or powered target_power repeater, is powered by
    only the nearest such repeater or target_power repeater, opportunistically
    as governed by the following rule:
  - a repeater or target_repeater powers at most X worth of buildables, where
    X is the repeater's buildpoint setting if the repeater or target_repeater
    is powered, and 0 otherwise (in case of an excessive set of (human,
    non-support) buildables closest to this repeater or target_repeater, the
    powered subset is determined by some internal mechanism, but is guaranteed
    stabilize quickly; unpowered buildables blow up shortly)
Comment 10 /dev/humancontroller 2011-08-06 02:48:38 EDT
Created attachment 2907 [details]
allow a special trigger to bring movers down manually

this is ==Troy=='s change, and i have no idea what this is about.
Comment 11 /dev/humancontroller 2011-08-06 02:49:19 EDT
Created attachment 2908 [details]
a trigger_hurt multiplexing attempt

this is ==Troy=='s an attempt to partially solve bug 2809.
Comment 12 /dev/humancontroller 2011-08-06 02:49:48 EDT
Created attachment 2909 [details]
add a string duplicating function into the game module
Comment 13 /dev/humancontroller 2011-08-06 02:50:24 EDT
Created attachment 2910 [details]
AMP DEBUG

displays trigger interaction. ==Troy== had a similar system.
Comment 14 /dev/humancontroller 2011-08-06 02:51:06 EDT
Created attachment 2911 [details]
AMP DEBUG PLUS

attempts to cut down the noise in the AMP debug output.
Comment 15 /dev/humancontroller 2011-08-06 02:51:33 EDT
Created attachment 2912 [details]
add an AMP compat hack for target_force_win

adds target_force_win, an old, redundant (use target_{alien|human}_win instead!) entity.
Comment 16 /dev/humancontroller 2011-08-06 19:54:08 EDT
i've just noticed that a couple of things relied on some local changes that i have not published. amendments for 2 of the posted patches will follow.
Comment 17 /dev/humancontroller 2011-08-06 19:55:28 EDT
Created attachment 2916 [details]
defucktardization amendment

this requires the (already posted) string duplicating function.
Comment 18 /dev/humancontroller 2011-08-06 19:56:01 EDT
Created attachment 2917 [details]
amendment for new AMP entities

this requires the (already posted) string duplicating function.
Comment 19 /dev/humancontroller 2011-08-06 19:57:33 EDT
Created attachment 2918 [details]
multitarget support amendment

just a minor fix for a quirk to remove redundant sp4m.
Comment 20 /dev/humancontroller 2011-08-06 23:45:13 EDT
Created attachment 2919 [details]
target_power amendment

to finish the target_power functionality as described.
Comment 21 /dev/humancontroller 2011-11-09 07:03:21 EST
Created attachment 3004 [details]
another multitarget support amendment

fixes trigger targeting when there are "gaps" in the [targetname, targetname2, targetname3, targetname4] list.
Comment 22 /dev/humancontroller 2011-11-12 08:33:53 EST
Created attachment 3005 [details]
another multitarget support amendment

this is a slightly different version of the above patch, this one retains more compatibility with existing AMP maps.