[Modpack] CTF PvP Engine [1.0] [ctf_pvp_engine]

User avatar
rubenwardy
Moderator
 
Posts: 5826
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Fri Mar 28, 2014 09:07

It supports infinite teams in theory, however there is only three colors of flags given with the mod.
You could make your own flags.
Last edited by rubenwardy on Fri Mar 28, 2014 09:07, edited 1 time in total.
 

User avatar
pmpeetamellark
New member
 
Posts: 3
Joined: Mon Jul 21, 2014 15:03
In-game: Peeta Mellark

Re: [Game] Capture the Flag / City VS City combat [0.2][capt

by pmpeetamellark » Thu Jul 24, 2014 18:23

How Do I Shoot?! Guns are not functioning even with ammo in the item selector!
Peeta Mellark
District 12 Tribute, Victor, and Mentor
May The Odds Be Ever In Your Favor! :)
 

User avatar
Krock
Developer
 
Posts: 4365
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
GitHub: SmallJoker
 

User avatar
maier.nathan
Member
 
Posts: 40
Joined: Wed Dec 04, 2013 02:07
Location: Myrtle Beach, South Carolina
GitHub: npmaier
In-game: Bikemare EdgarLinton

Re: [Game] Capture the Flag / City VS City combat [0.2]

by maier.nathan » Sun Dec 21, 2014 19:29

Hi,
I am trying to add a player to a default team when a new player join. Any ideas how?
there's minetest.register_on_newplayer. This is for a subgame.
Thanks very much,
Bikemare
 

CreeperLord700
New member
 
Posts: 7
Joined: Sun Dec 14, 2014 00:52
IRC: CreeperLord700
In-game: CreeperRocker

Re: [Game] Capture the Flag / City VS City combat [0.2]

by CreeperLord700 » Fri Dec 26, 2014 21:21

ruben, i cant seem to be on a team, i do /join team singleplayer CR and team fails, i place flag and pops up " you are not part of a team!"
 

User avatar
rubenwardy
Moderator
 
Posts: 5826
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Game] Capture the Flag / City VS City combat [0.2]

by rubenwardy » Sat Dec 27, 2014 15:38

CreeperLord700 wrote:ruben, i cant seem to be on a team, i do /join team singleplayer CR and team fails, i place flag and pops up " you are not part of a team!"


It is /join team_name. Create a team using /team add team_name.

maier.nathan wrote:Hi,
I am trying to add a player to a default team when a new player join. Any ideas how?
there's minetest.register_on_newplayer. This is for a subgame.
Thanks very much,
Bikemare


Auto allocating teams is a planned feature.

Code: Select all
ctf.join(player_name, "team_name", true)


Only do it on their first join, otherwise they will change team everytime they join.

(^ You need the latest version of the source code, uploaded today 27/12/2014)
 

User avatar
rubenwardy
Moderator
 
Posts: 5826
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
 

User avatar
rubenwardy
Moderator
 
Posts: 5826
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Game] Capture the Flag / City VS City combat [0.3]

by rubenwardy » Sun Dec 28, 2014 17:59

0.3 Released!



New Features
  • Auto allocation to teams
  • Start of HUD

Logistical Changes
  • Now licensed under LGPL 2.1 or later for code, CC BY-SA 3.0 or later for textures.
  • Use vector helpers from the lua_api, rather than v3 from commonlib.
  • Change namespace from cf to ctf
  • Rename main mod to ctf and move into modpack. Also turret -> ctf_turret and protect -> ctf_protect
  • Move code around to be cleaner. Init.lua now only contains dofiles()
  • ctf.register_on_load and ctf.register_on_save for adding things to ctf.txt
  • Removed firearms
  • Cleaned lots of code styles

Bug Fixes
  • /ctf crash
  • Fix assignment to unassigned global
  • Many smaller changes

To Do
  • Fix settings data types. (all settings are strings if from minetest.conf, so are always true)
  • Skins for players
  • More colours
  • Get flag taking working better:
    • player can be seen holding the flag
    • safer flag taking (bulletproof)
    • Timers (only certain amount of time to return it.
    • How the player is stopped - add tag, drop on death and return on death options
    • Allow flags to be passed between players
  • Items:
    • Deco flags
  • Flag finder / some way for a player to locate a flag
  • Awards
  • Add more settings etc
  • Opening and closing teams to new members
  • Use privileges for team_owners
 

User avatar
sirken
Member
 
Posts: 15
Joined: Thu Oct 09, 2014 15:18
GitHub: sirken

Re: [Game] Capture the Flag / City v City [0.3] - Team Alloc

by sirken » Mon Dec 29, 2014 00:53

Looking forward to trying this!

How do you place flags?

I'm guessing it's under the Flags button in the /team GUI, but I couldn't get it to work. I added teams (red/blue), then had players choose teams. Team owners were chosen. I opened menu with /team, and clicked the Flags button and server crashed:
Code: Select all
16:09:09: ERROR[main]: ServerError: ...ames/capturetheflag/mods/capturetheflag/ctf/core.lua:269: attempt to compare number with string
16:09:09: ERROR[main]: stack traceback:
16:09:09: ERROR[main]:    ...ames/capturetheflag/mods/capturetheflag/ctf/core.lua:269: in function '?'
16:09:09: ERROR[main]:    .../builtin/game/register.lua:348: in function <.../builtin/game/register.lua:336>


Using Minetest 0.4.10-71-g9e4e707

Thanks.
 

User avatar
rubenwardy
Moderator
 
Posts: 5826
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Game] Capture the Flag / City v City [0.3] - Team Alloc

by rubenwardy » Mon Dec 29, 2014 11:02

You place the ctf:flag node. I'll look into that bug, ot is probably a settings data type thing.
 

User avatar
rubenwardy
Moderator
 
Posts: 5826
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
 

User avatar
sirken
Member
 
Posts: 15
Joined: Thu Oct 09, 2014 15:18
GitHub: sirken

Re: [Game] City v City / Capture the Flag [0.3] - Team Alloc

by sirken » Wed Jan 14, 2015 06:34

rubenwardy wrote:Fixed that bug, and possibly many others. It was a settings data type thing.

30633 (Fix setting data type issues)


It is working for me now, thanks for the fix.
 

Gerald
Member
 
Posts: 91
Joined: Sun Dec 28, 2014 10:35
Location: Germany
In-game: gerald7

Re: [Game] City v City / Capture the Flag [0.3] - Team Alloc

by Gerald » Wed Jan 14, 2015 21:19

I found a little bug. If TNT explodes near a flag, the flag does not disappear but if a mine explodes the flag disappears being still spawnpoint and in the list of flags.
 

User avatar
rubenwardy
Moderator
 
Posts: 5826
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
 

Gerald
Member
 
Posts: 91
Joined: Sun Dec 28, 2014 10:35
Location: Germany
In-game: gerald7

Re: [Game] City v City / Capture the Flag [0.3] - Team Alloc

by Gerald » Thu Jan 15, 2015 14:28

Maybe i just not found the right commands:
Is it possible to leave a team or to change team or to delete a team? If i try join another team there is the message 'joining <> to team <>' but nothing happens.
 

User avatar
rubenwardy
Moderator
 
Posts: 5826
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Game] City v City / Capture the Flag [0.3] - Team Alloc

by rubenwardy » Thu Jan 15, 2015 15:24

Try /join team-name

I haven't tested /team join playername teamname in a while.

Deleting is planned, I noticed that you couldn't do that recently. You currently can't just leave a team and not be on a team.
 

Gerald
Member
 
Posts: 91
Joined: Sun Dec 28, 2014 10:35
Location: Germany
In-game: gerald7

Re: [Game] City v City / Capture the Flag [0.3] - Team Alloc

by Gerald » Thu Jan 15, 2015 16:21

Thanks for the fast answer.

I wanted to construct short events like 3 vs 3 capture the flag or something like bedwars on a map, which resets after the event and the players are teleported back to spawn able to start a new event dividing different into two new teams.
 

ABJ
Member
 
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.
GitHub: ABJ-MV
In-game: ABJ
 

Xudo
Member
 
Posts: 153
Joined: Wed Nov 09, 2016 16:43
GitHub: akryukov92
In-game: Xudo

Re: [Modpack] CTF PvP Engine [1.0] [ctf_pvp_engine]

by Xudo » Fri Nov 11, 2016 13:04

I'm trying to setup my local server for this game and getting a problem.
Teams and its members doesn't persist if I restart server.
I have made 5 players: admin, RedKing, RedSlave, BlueKing, BlueSlave and then:
admin: /team add blue
admin: /team add red
RedKing: /join red
BlueKing: /join blue
admin: /shutdown

If I run server after this and use "/t hi all" from RedKing, I would get message "You're not in a team, so you have no team to talk to".

Are they supposed to persist at all?
 

Xudo
Member
 
Posts: 153
Joined: Wed Nov 09, 2016 16:43
GitHub: akryukov92
In-game: Xudo

Re: [Modpack] CTF PvP Engine [1.0] [ctf_pvp_engine]

by Xudo » Sat Nov 12, 2016 12:38

I have found source of the problem. When players join to team, ctf state is not being marked as "need save". Thats why it wasn't saved.

I assume this might be an option for games with short sessions. I have added config parameter to persist team membership.
I have failed to push it to your repository and to attach a patch, though.
Code: Select all
---
 ctf/core.lua  | 1 +
 ctf/teams.lua | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/ctf/core.lua b/ctf/core.lua
index fe69334..29452b1 100644
--- a/ctf/core.lua
+++ b/ctf/core.lua
@@ -146,6 +146,7 @@ function ctf.init()
    ctf._set("hud",                        true)
    ctf._set("autoalloc_on_joinplayer",    true)
    ctf._set("friendly_fire",              true)
+   ctf._set("persist_team_membership",    true)
 
 
    for i = 1, #ctf.registered_on_init do
diff --git a/ctf/teams.lua b/ctf/teams.lua
index 57ff274..bb3756c 100644
--- a/ctf/teams.lua
+++ b/ctf/teams.lua
@@ -200,6 +200,9 @@ function ctf.join(name, team, force, by)
    for i = 1, #ctf.registered_on_join_team do
       ctf.registered_on_join_team[i](name, team)
    end
+   if ctf.setting("persist_team_membership") then
+      ctf.needs_save = true
+   end
    return true
 end
 
 

User avatar
rubenwardy
Moderator
 
Posts: 5826
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
 

Xudo
Member
 
Posts: 153
Joined: Wed Nov 09, 2016 16:43
GitHub: akryukov92
In-game: Xudo

Re: [Modpack] CTF PvP Engine [1.0] [ctf_pvp_engine]

by Xudo » Sun Nov 13, 2016 13:08

I have implemented few things in your mod.
What should I do to merge them to master?
What are your requrements for testing?

Things are:
  • "/apply <team>" console command. Players can ask to join. Team managers can decide whether they should be in team or not.
  • "Petitions" tab in team interface. You can see there a list of players wanted to join and accept or reject their applications.
 

User avatar
rubenwardy
Moderator
 
Posts: 5826
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Modpack] CTF PvP Engine [1.0] [ctf_pvp_engine]

by rubenwardy » Sun Nov 13, 2016 14:29

Preferably, you should fork my repo, create a new branch there and commit your changes, then click "create pull request"
 

Xudo
Member
 
Posts: 153
Joined: Wed Nov 09, 2016 16:43
GitHub: akryukov92
In-game: Xudo

Re: [Modpack] CTF PvP Engine [1.0] [ctf_pvp_engine]

by Xudo » Mon Nov 14, 2016 17:07

Looks like I have figured out how to do this.

I feel really uncomfortable with changing this mod without any tests. Thats why I'm going to increase production quality of this mod.
Do you have any familiar unit-testing framework?
If not, I'll use lunatest.
 

User avatar
rubenwardy
Moderator
 
Posts: 5826
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Modpack] CTF PvP Engine [1.0] [ctf_pvp_engine]

by rubenwardy » Mon Nov 14, 2016 17:32

Yeah, tests are definitely needed

I'd buy you a coffee if you could add tests to this modpack :D
 

PreviousNext

Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 2 guests