Realm667 / WolfenDoom

"WolfenDoom - Blade of Agony" | Important: This is only meant for development and testing purposes. You are NOT ALLOWED to use material from this repository for your own projects. Important: This repository is for development and testing purposes, you are NOT ALLOWED to use the copyrighted material for your own projects without our permission!
http://boa.realm667.com
259 stars 26 forks source link

Bugs and exploits on INTERMAP #31

Closed yqco closed 8 years ago

yqco commented 8 years ago
  1. Buddha mode is enabled after leaving the training grounds. This is caused by the linedefs meant to toggle buddha being in the wrong order or not marked as "Front side only." This is game breaking because buddha mode persists into the next levels. Disable buddha linedef Enable buddha lindef
  2. The equipment from the training grounds can be smuggled out for use in missions. This is achieved by dropping the weapons immediately before they are removed. They can then be picked up and tossed near the entrance door to be recollected on the way out. The grenade and rocket caches can also be abused this way and should probably be disabled when their training stage is complete. Stashing training equipment for later Using training equipment in mission
Ozymandias81 commented 8 years ago
  1. For the Buddha mode, well it's easy to fix and I also suggested back in the days to add a raising gate over the entrance after we've finished the training course, so I'll re-add that now (and fix the Buddha thing).
  2. I'll come with something

Thanks for these spots, now let's see how I'll solve them.

Ozymandias81 commented 8 years ago

Ok, beside the droppable glitch (which a player must FORCE it anyway, pressing a button), eveything's got fixed. Now it's time to think how to remove the Treasure Chest on the map if we opened it (a boolean script could be the solution but it requires some think atm - I guess if we apply a checker before we speak to Miller, while leaving the HQs for a mission, if TRUE = Remove so do stuff otherwise FALSE = just do stuff)

Nice that I noticed there still were portions of the old Gate tweak script on the Intermap code, so I had just to update tags (109) :smile:

yqco commented 8 years ago

I took a shot at removing the empty treasure chest at level change. It's quite tricky; the empty chest doesn't have a TID so it can't be referenced by a script. Rather than spawning the empty chest via the pickup's Inventory.PickupFlash property, I opted to pre-spawn it in the pickup's Spawn state using A_SpawnItemEx where it can be given a TID.

It works like this: When a chest is opened, it's replaced with a reward pickup. The reward pickup spawns an invisible empty chest alongside itself. After the player picks up the reward, the empty chest becomes visible. All three actors share the same original TID. This allows scripts to check if a chest has been opened and collected by verifying that only one actor is using the chest's TID and that its class is "EmptySupplyChest:"

// How the chest on INTERMAP is removed after it has been unlocked and collected.
script "RemoveSupplyChest" UNLOADING
{
    int chest_tid = 39;
    if (ThingCount(T_NONE, chest_tid) == 1 && CheckActorClass(chest_tid, "EmptySupplyChest"))
    {
        Thing_Remove(chest_tid);
    }
}

I also generalized the SupplyChest script to allow mappers to place treasure chests without the need to assign a thing special or define a "501" script in every map. Chests automatically set their special to execute the SupplyChest script and pass in their thing arguments. Their arguments are interpreted as follows:

  1. The reward type (as defined in boalib.acs).
  2. An optional script number to execute when the chest is unlocked. The script is passed the chest's TID.
  3. An optional objective index to clear when the chest is unlocked.

New treasure chest thing properties

The optional script argument allows prize IDs to be shared without tying map-specific events to them. For example, the treasure chest on C1M1 can have the rooftop guard spawning logic moved to the map's own script file and still allow other maps to use the prize ID for 25 coins.

Pull request for more generalized treasure chests.

These changes unfortunately break the existing treasure chests. The treasure chests' action specials need to be set to zero and their arguments adjusted. In most cases the 501 script can be removed. I've gone through the maps and made these changes.

Pull request to repair treasure chests if above request is merged.

Ozymandias81 commented 8 years ago

These changes are fantastic! I wrote now a message on FB Team chat but today I'll be at home only this evening (it's 11:35am where I live atm), so maybe someone else will give you an answer (Torm?)... otherwise if the team will agree with these changes, I'll merge both pull requests then. :muscle:

Tormentor667 commented 8 years ago

Very good improvements, thanks for these, I am okay with merging this.

Ozymandias81 commented 8 years ago

Ok then, I'll merge these in a while :+1:

Ozymandias81 commented 8 years ago

Yqco if you don't find anything relevant concerning issues, you are free to close this then. I must say thank you so much, hopefully we'll get the time to test these properly in the nearly future on mutliplayer

yqco commented 8 years ago

I've made a pull request to prevent the weapon smuggling issue. Currently, it's still possible to sneak weapons out by throwing them beyond the lines that clear the player's inventory but it's a lot more arduous than before. The pull request fixes this by preventing the training weapons from being dropped entirely. Whether the pull is merged or not, I think it's fair to close this issue.

Ozymandias81 commented 8 years ago

I merge this because I like nitpicky things :tongue: I feel so satisfied when an issue is completely removed ahaha Thanks a lot Yqco, you did a great job with this fix (and the flinch script, obviously)

Ozymandias81 commented 8 years ago

I consider this re-opened because we can throw grenades now that I fixed items carried from other missions. What I'll need now is a checker while we stay on HQs... Unless we are on the Training Grounds, we mustn't be able to throw grenades and also we must not lose them if their use is excluded on HQs (a JumpIf thing probably would break this, resulting that we don't throw the grenade but we use the item... and this would mean add some more issues :tongue: )

Ozymandias81 commented 8 years ago

Hopefully this grenade thing is fixed... I'll close it after I'll get confirmations from other team members.

yqco commented 8 years ago

There's a cleaner way of handling the grenade state by using the Fail instruction. I was trying to fix it too. I'll upload what I've got so you can see.

Edit: Actually I'll just post the relevant bit here:

States
{
Spawn:
    THRP A -1
    Stop
Use:
    TNT1 A 0 A_JumpIfInventory("HQ_Checker", 1, "NoThrow")
    TNT1 A 0 A_JumpIf(CallACS("AstrosteinCheck"),2)
    TNT1 A 0 A_FireCustomMissile("HandGrenade",0,0,0,0,FPF_NOAUTOAIM)
    Stop
    TNT1 A 0 A_FireCustomMissile("AstroHandGrenade",0,0,0,0,FPF_NOAUTOAIM)
    Stop
NoThrow:
    TNT1 A 0
    Fail
}
Ozymandias81 commented 8 years ago

Added, thanks. I thought for some reason it could be responsible of weird glitches, but I was wrong (I checked properly the wiki now).