Giter Club home page Giter Club logo

hmod's People

Contributors

arionwt1997 avatar chi1 avatar cinaera avatar datag avatar debfx avatar fstd avatar heinrich5991 avatar henningstone avatar joeldevahl avatar jxsl13 avatar kaffeine avatar kneekoo avatar larsfu avatar learath2 avatar lordsk avatar mydopefish avatar noxifoxi avatar oy avatar phobos99 avatar ravomavain avatar serpis avatar shereef avatar sushitee avatar teetime avatar teetow avatar teeworlds-org avatar temporaryna avatar theamazinglooser avatar vierkant avatar xalduin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

hmod's Issues

Freeze/Unfreeze

Commonly used feature on many mods; native support would certainly be greatly appreciated.

Controllable dummies

Make it possible for gametypes to add dummies to the server that can then be controlled through a handle. This is meant to provide a simple interface to hide away all the input logic in cases where it's not needed. The standard way of setting manipulating the dummy's input struct will of course still be available for granular bot development.

In order to correspond with master server rules, dummies on the server will not increase the player count in the server list, but instead decrease the number of slots available on the server. The server browser's scoreboard will group together all the bots into a single element at the top, just displaying SPEC < 5 bots > to inform potential new players that there are server sided bots on this server.

A call to Srv.Server:AddDummy(string Name, string ) will return a CPlayerDummy pointer. The CPlayerDummy class inherits from CPlayer and adds additional methods for easy dummy control.
These methods should include:

  • WalkTowards(vec2 *Point) makes the dummy go towards the given point. There will no checks be done if the point can actually be reached, that's up to the scripter. If the dummy does actually reach the point, it will do it's best to stay there until instructed differently. Call with nil as the argument to stop moving.
  • JumpIf( { function Eval(CCharacter DummyChr) *} ) The given function is evaluated every tick if a destination point has been set using WalkTowards. If the given function returns true, the dummy will jump. this and self are valid for the concerned dummy object.
  • TargetPlayer(CPlayer *Player [, int AccDev]) will make the dummy target this player (i.e. aim at him) with the given accuracy deviation. 0 means aiming perfectly on the tee, higher values set a margin for randomization. Default is 0. Pass nil as the first argument to unset the target.
  • Attack() makes the dummy attack the set target if it is in range of the dummy's current weapon. (This method only instructs it to shoot, no positional change will be performed in order to be able to hit the target). The dummy will keep on attacking until Peaceful() is called. If there is no target set, this function does nothing.
  • AttackIf( { function Eval *} ) The given function is evaluated every tick after Attack() has been called. If Eval does not return true, the dummy will ignore that he's supposed to attack for the current tick. Call AttackIf with nil as an argument to unset the callback, which will make the dummy always attack. this and self are valid for the concerned dummy object.
  • Peaceful() stops the dummy from attacking (but does not unset the target)

Possible events emitted by dummies include:

  • OnTargetReached(vec2 Point) called when the dummy first gets closer than 32 to the point specified with WalkTowards. The point is passed as an argument; this and self are valid for the concerned dummy object.

// TODO: amend these lists with whatever comes to mind


A note about uncommon semantics used in this document:

  • (1) An asterisk (*) to the left of an argument means that this argument can be nil.
  • (2) Curly brackets ({}) around an argument mean, that this argument has to be an an array (i.e. a consecutively numerical indexed table) of elements of the denoted type.
  • (3) An asterisk to the left of the closing bracket in (2) denotes, that you can pass a table, but also just a single element of the given type.

Tuning variables in lua and per-tee tuning

All tuning variables must be bound into the api read-only. Additionally, it should be possible to assign each character individual tuning parameters that gameplay will obey (not talking about faketune!).

ref #3

Customizable spam protection

sv_spamprotection is part of vanilla, but it only allows you to toggle it on or off altogether.

A customizable spam protection allows to adjust the delay on every single aspect that's protected against spam by introducing additional config variables the server admin can use to change spam delays at will. For example, one may want fast emote switching (which makes it feel so much more snappy), but not fast chat spamming (which is just awful).

Add MySQL support

Many teeworlds servers use decentralized sql databases nowadays, so let's support that aswell.

Stuff we need.

In this issue i will collect all missing features of lua ^^.

  • CNetEvent's (Like explosions) [wontfix; Explosions: 995c542]
  • Chat Management [720c123]
  • Config Vars [issue obsoleted, see new issue]
  • Tuning Vars [issue obsoleted, see new issue]

If you miss some features too, write it in here! I will collect them and update this Issue.

Server restart command and shutdown reason

At least the latter should already be in vanilla, but it's not. People may want to tell their players why the server has been closed, maybe it's just a little maintenance restart, and if noone knows they'll all be gone after that D:

Map gets loaded twice with sv_map in autoexec.cfg

When using the command sv_map in your autoexec.cfg, the server will load the map before startup and immediately reload it in the first iteration of the main loop.

This does not break anything and is just a minor annoyance.

MACRO_LUA_CALLBACK_RESULT_REF in case of OnWeaponFire is not working sometimes.

I made some tests, and found out that the
MACRO_LUA_CALLBACK_RESULT_REF("OnWeaponFire", Result, m_ActiveWeaponSlot, ProjStartPos, Direction) is not working sometimes (Seems if my weapon got too less reload it simply dont launch the lua function at all!)
What i wanna say with that is, that lua didnt even got a call on that function an ofcourse can't return anything! This is ruining the most of my current mod which modifies all weapons and pretty much need that function/event.

I made a little test with debug prints (they show me that the code, which is only getting launched when i return not true at all) gets launched, but this is impossible because i always return true at all.

In my 2nd test i just modified the default value from false to true and it worked perfectly (it always printed my debug print in this function ๐Ÿ‘ ). Ofc. it do not work at all if i delete my custom function and let the default value at true. This says to me that lua/the callback event must return nil at all.

Based on the fact that this phenomenon only occurs when i call this event in a short period of time i suppose it have to be something with a thread (or lua at all?).

Please take a look onto this.

Per-Player rcon and custom auth levels

I currently code a mod via lua and need much output. The chat is not optimal for that but a console.
The only console we can use on a server is the rcon. So I need a fake-auth in the rcon to give a player only player-related commands. (Player related voting menu is not exactly what i want).
You can compare this almsost with the ddnet rcon expect that every tee should gain a own fake-auth indeed of a auth-level. So we can write to each tee's rcon without a interference of the other rcon's.

You should just allow us a special auth-feature and 1 hardcoded command
login s to login as admin.
The other commands should be coded by lua and all tees must gain their own rcon via lua!

Hope this will came true! We will rise to a new era in Teeworlds with that :3

Redirect disk write requests to $DATADIR

Redirect disk write requests to a 'sandbox'-like folder in our appdata directory so that the binary directory doesn't get cluttered up.

Each gametype has to get its own folder, and there should be an option for the end user to override the location and select the folder manually.

Config variables in lua

Bind all the existing config variables read-only into the api and make it possible for gametypes to add their own. The latter could use a similar system like the one used for registering custom rcon commands (config vars are just special commands after all).

ref #3

Support for custom physical entities

It would be neat if you could create custom entities with similar properties to characters in regards to physics collision with other entities and destroyability.
Sure this could be implemented solely in lua but it would be a lot of unnecessary code.

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.