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

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
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.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

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

by rubenwardy » Sat Dec 27, 2014 17:37

Added automatic allocation of players to teams.

https://github.com/rubenwardy/captureth ... 975c5960a9
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
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:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
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
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
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 19:59

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

30633 (Fix setting data type issues)
 

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: 47
Joined: Sun Dec 28, 2014 10:35
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
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

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

by rubenwardy » Wed Jan 14, 2015 22:05

I didn't anticipate that. I will update the traps mod to use the TNT code.
 

Gerald
Member
 
Posts: 47
Joined: Sun Dec 28, 2014 10:35
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
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
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: 47
Joined: Sun Dec 28, 2014 10:35
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: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

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

by ABJ » Fri Jul 22, 2016 21:17

How about duels between two separate challenging team members?
 

Xudo
Member
 
Posts: 20
Joined: Wed Nov 09, 2016 16:43
GitHub: xudojnikomsk
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: 20
Joined: Wed Nov 09, 2016 16:43
GitHub: xudojnikomsk
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.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

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

by rubenwardy » Sat Nov 12, 2016 15:38

there's no need for an option, I just forgot to add it there

https://github.com/rubenwardy/ctf_pvp_e ... 58f0799d50
 

Xudo
Member
 
Posts: 20
Joined: Wed Nov 09, 2016 16:43
GitHub: xudojnikomsk
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
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
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: 20
Joined: Wed Nov 09, 2016 16:43
GitHub: xudojnikomsk
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
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
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
 

User avatar
ParaklataChotou
Member
 
Posts: 209
Joined: Sat Jun 18, 2016 17:09
GitHub: paraklatachotou
IRC: CareBearWhoCares
In-game: AutistCortana

Re:

by ParaklataChotou » Sun Nov 20, 2016 22:38

rubenwardy wrote:It supports infinite teams in theory, however there is only three colors of flags given with the mod.
You could make your own flags.

Ruben, I was testing these mods, and barrier isn't working. I don't know why...
Image
Attachments
rerrorflag.png
rerrorflag.png (17.82 KiB) Viewed 5490 times
Visit my server: freextress.ddnsking.com 30002 . mobs, npcs, interesting places, pvp.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

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

by rubenwardy » Sun Nov 20, 2016 22:52

That's a dependency bug in the subgame viewtopic.php?f=50&t=12835
Not this mod

It's now fixed
 

User avatar
ParaklataChotou
Member
 
Posts: 209
Joined: Sat Jun 18, 2016 17:09
GitHub: paraklatachotou
IRC: CareBearWhoCares
In-game: AutistCortana

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

by ParaklataChotou » Sun Nov 20, 2016 23:24

Thank you rubenwardy, you're the best. n_n.
Visit my server: freextress.ddnsking.com 30002 . mobs, npcs, interesting places, pvp.
 

User avatar
ParaklataChotou
Member
 
Posts: 209
Joined: Sat Jun 18, 2016 17:09
GitHub: paraklatachotou
IRC: CareBearWhoCares
In-game: AutistCortana

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

by ParaklataChotou » Mon Nov 21, 2016 22:48

rubenwardy wrote:That's a dependency bug in the subgame viewtopic.php?f=50&t=12835
Not this mod

It's now fixed

Hi, I've got a new problem. When a team wins, the resetting game isn't working. It freezes the server. How can I fix this problem? Another problem, the barrier appears just one time. How can I configure it?
Visit my server: freextress.ddnsking.com 30002 . mobs, npcs, interesting places, pvp.
 

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

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

by Xudo » Thu Nov 24, 2016 15:14

@rubenwardy, can you explain how diplomacy supposed to work?
What are teams states?
What actions you need to perform to change from each state to each other?
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

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

by rubenwardy » Thu Nov 24, 2016 15:22

There are three diplomacy states: war, peace and alliance. I forget the exact names.

War means turrets will attack the enemy
Peace means turrets won't
Alliance allows you to build on your territory

Note that turrets were removed a while ago as they are more of a city vs city feature, and didn't belong in the caturetheflag subgame. If I ever make a cityvscity game they'll go there

To change diplomacy modes you need to use the diplomacy tab as a team leader.

Going up towards alliance requires agreement from the other team
Declaring war or breaking an alliance doesn't require agreement

Agreement is given by the other team accepting your request in your news feed
 

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

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

by Xudo » Thu Nov 24, 2016 16:07

How diplomacy state related to ability to hurt players from other team?
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

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

by rubenwardy » Thu Nov 24, 2016 16:10

It's currently not. But it should be taken into account. https://github.com/rubenwardy/ctf_pvp_e ... s.lua#L462
 

Previous

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 8 guests

cron