Code Monkey home page Code Monkey logo

kpm's Introduction

Promod - The competetive BF3 experience

This mod is heavily based on the Call of Duty 4 Promod, and kinda works like CS:GO's defusal gametype. Attackers need to kill all enemies or plant the bomb before the timer runs out. Defenders need to defend both bombsites or wait for the timer to run down.

Screenshots

Teams Loadouts Warmup Win

Config

You can find and modify the config file here: ext\Shared\kPMConfig.lua

Maplist.txt

Warning: You might experience crashes when loading the next map, the code is optimized for single map use only!

XP2_Skybar TeamDeathMatchC0 2
MP_017 TeamDeathMatch0 2
MP_011 TeamDeathMatch0 2
MP_001 TeamDeathMatch0 2

You can create your maps too! Modify the MapsConfig.lua to create your own map.

Issues

If you encounter any issues while playing Promod, please let me know by adding a ticket on the GitHub repo's issue page: https://github.com/kaloczikvn/kPM/issues

Developers

Setup
  • Install nodejs.
  • Download Promod files and place them in .../Server/Admin/Mods. Path should look like .../Server/Admin/Mods/kPM.
  • Add kPM to your modlist.txt file.
  • Open cmd, cd to .../Server/Admin/Mods/kPM/ui and run npm install.
  • After all the dependencies are installed run npm run build or if you want to test in the browser run npm run start.
Translations

You can create your own translations! The translation strings is located in: kPM/ui/srs/translations.ts. Please create a pull request if you want your translation to be included in the official version.

Language can be set by the admin in the ext/Shared/kPMConfig.lua file using the ServerLanguage variable.

Warning: In the string 'Round {round}': 'Round {round}', {round} should remain the same for every language. It is replaced programmatically.

Config

The Promod config can be found here: ext/Shared/kPMConfig.lua. Please set the AdminName to your name!

Download

Promod is a work in progress mod so keep in mind that. Release version

kpm's People

Contributors

kaloczikvn avatar kiwidoggie avatar zestybaby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

simber1 zestybaby

kpm's Issues

attempt to index a nil value

[2020-12-20 23:56:05+01:00] [error] [VeniceEXT] [kpm] Error: [string "__init__.lua"]:907: attempt to index a nil value (local 's_Player')
stack traceback:
        [string "__init__.lua"]:907: in method 'DisablePlayerInputs'
        [string "__init__.lua"]:901: in function <[string "__init__.lua"]:900>
        ```

Killcam bug

If you get killed last and the round is over you get respawned (when the gamestate is strat) but your camera will still follow the player that killed your for around 4-5 seconds.

Force players into squads

function kPMServer:OnPlayerFindBestSquad(p_Hook, p_Player)
    -- TODO: Force squad
end

Fix up this code in Server / init.lua

Game end

Needs a special screen UI side and need to finish the logic server and client side.

Set server settings when mod loaded

vars.miniMapSpotting true
vars.3dSpotting false
vars.killCam false
vars.nameTag false
vars.3pCam false
vars.friendlyFire true
vars.idleTimeout 0
vars.autoBalance false
vars.teamKillCountForKick 0
vars.teamKillKickForBan 0
vars.regenerateHealth false
vu.ColorCorrectionEnabled false
vu.SunFlareEnabled false
vu.SuppressionMultiplier 0
vu.DestructionEnabled false

Select side after knife round

Get the squad leader of the team that won the knife round, let him choose which side his team wants to start.

Needs a bit of UI (or can be chat based).

If no side selected after 10 or so seconds, select the default side (attackers).

Weaponslot issues

LoadoutManager.lua - from line 94.

self.m_PlayerLoadouts[p_Player.id] = {
    Class = p_Data["class"],
    Weapons = {
        ResourceManager:SearchForDataContainer(p_Data["primary"]["Vext"]),
        ResourceManager:SearchForDataContainer(p_Data["secondary"]["Vext"]),
        ResourceManager:SearchForDataContainer(p_Data["tactical"]["Vext"]),
        ResourceManager:SearchForDataContainer(p_Data["lethal"]["Vext"]),
        ResourceManager:SearchForDataContainer("Weapons/Knife/U_Knife")
    },
    Attachments = {
        ResourceManager:SearchForDataContainer(p_Data["primaryAttachments"]["Sights"]["Vext"]),
        ResourceManager:SearchForDataContainer(p_Data["primaryAttachments"]["Primary"]["Vext"]),
        ResourceManager:SearchForDataContainer(p_Data["primaryAttachments"]["Secondary"]["Vext"])
    }
}

Every weapons should correspond to the corrent WeaponSlot.

It works for now but you can only select some weapons using the scroll wheel.

Team mix-up bug

It occurs on a regular basis that one can end up on the wrong side , like an imposter. In the scoreboard he is listed as "Attacker" but spawns in the Defender Team, and Defender Spawn. So he can't defuse the bomb. On the other hand he can be listed as "Defender" but spawns in the Attacker Team, can't plant the bomb.

I can't really tell why and when this is happening , but it happens ... a lot !
Just wanted to dump this here.

IMPORTANT: Bomb Planting

We need to spawn the two bombsites with icons on the minimap too.

If you are an attacker you can press and hold then interact key inside a set radius of any bombsites to plant. (Client / init,lua already has some code for this). After planting disable or remove the other bombsite.

Defenders can defuse the same way attackers plant.

Disable all movement and shooting when planting or defusing.

If the bomb explodes or defused the round should end. Reset / cleanup the bombsites every round.

No HUD display

When I load the mod as you requested, I find that no ui is displayed, and typing the command doesn't seem to work

Balance the kits and weapons

For 1.0 we shouldn't modify weapon handling but classes play huge role in this mod.

Classes have unique items to use for example: Sniper class can use a MAV to scout for enemies.

Bomb IconEntities too high

Mostly on smaller maps with multiple levels/floors it can be really confusing when the bomb marker icon is not actually at the bombsite, but around 10 meters above.

We are running promod currently on Scrapmetal , take a look at the screenshot :
marker

Is this by design ? Or just never noticed ?

It's probably something small around those lines :

function kPMShared:SpawnIconEntities(p_Trans, p_Id)
    local s_CustomMapMarkerEntityData = nil
    print("SpawnIconEntities: "..p_Id)
    if p_Id == "A" then
        s_CustomMapMarkerEntityData = MapMarkerEntityData(ResourceManager:SearchForInstanceByGuid(self.m_CustomMapMarkerEntityAGuid))
    elseif p_Id == "B" then
        s_CustomMapMarkerEntityData = MapMarkerEntityData(ResourceManager:SearchForInstanceByGuid(self.m_CustomMapMarkerEntityBGuid))
    end

    if s_CustomMapMarkerEntityData ~= nil then
        local s_EntityPos = LinearTransform()
        s_EntityPos.trans = p_Trans.trans

        local s_CreatedEntity = EntityManager:CreateEntity(s_CustomMapMarkerEntityData, s_EntityPos)

        if s_CreatedEntity ~= nil then
            s_CreatedEntity:Init(Realm.Realm_ClientAndServer, true)
        end
    else
        print('err: s_CustomMapMarkerEntityData - could not spawn icon.')
    end
end

Start warmup automatically

The Warmup (And the beginning of a new round) now only start if someone types " !warmup " in the chat. Shouldn't this be automatic when for example enough player have joined the server ? And if there are too many ppl still missing then it should display a message "waiting for more players for warmup" or something similiar.

Auto-join issue

Sometimes they happen to auto-join and don't evenly separate the players

Holding {interact} mouseup needed

Holding {interact} should require a mouseup event before un-readying again imo. otherwise you're unready before you even know what happened

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.