1 (edited by Mo2 2012-02-09 23:03:26)

Topic: [MOD] CNH

This one was already done a few days ago... At first I've planned to release with a windows-server-binary since I had a working build environtment ready from Nodes anyway. But since my windows thought it's a good idea to run into an endless update loop of death and my hardware-supplier just gave me a media that allows me to wipe all partitions I'm skipping the windows binary currently and would release what I have.

So this one is called CNH and is similar or almost the same as DOM. I've found the DOM thread after I've already that MOD running and the idea itself is not really that new (but seen in various other shooters already) and it seems there was nothing for 0.6.x available anyway. If you don't know such DOM-like mods (or CNH) following the objectives:

2 Teams that would capture and hold all areas.
To capture an area you have to move your tee onto a area.
If you are there the "clock" symbol at top of that area might starts filling the circle.
If it's filled white it's yours.
If it's not starting to fill (capture) it may be very well that an enemy is there or that you may not capture that area right now but have to get the previous first (depending on the mode or vote). Then, in case of an enemy, you don't get a clock symbol but a tower symbol instead (filled white if it's owned by
In fact you can capture only an area that is clean. So you have to get those intruders first out of the way before you can capture that area for about 2 seconds (configureable default value).
If your team owns all areas you win (in normal CNH mode).
Default capture mode is ordered. So red have to capture/protect area 1 then 2 then 3 then 4 and finally  5. Blue 5-> 4-> 3-> 2-> 1. Which means you may not capture already area 5 if you don't own area 4 first. But this can be changed via config or vote (so anybody can try to capture any area if no enemy is there).

There is even a mode where one team starts already with all areas owned and the other team owns no area at all but have to try to steal them from the defending team until the timeout (7min default) reaches (if mapper used just one side). After timeout teams are changed automatically (by default).


Download source (patch for 0.6.1 TW - should work with release and even snapshot from github)
Download Linux binary (32bit)
Download Linux binary (64bit)
Download Win32 binary

Download entities.png (just required if you like to create a map)
Edit: I've forgot.... I've already created 2 example maps.
Download cnh1.map
Download cnh2.map (especially for Defender)
Download ctf5_cnh.map


All stuff cames as is without any warranty of any kind. To get a full source from the patch to compile download the patch and use "patch" (counterpart of linux-diff) that way in your extracted tw-source-dir: "patch -p1 < cnh_beta.patch". Afterwards compile as normal TW with bam.


Following new server options can be configured:

sv_area_timer_1: Required force to capture CNH Area 1 (default 4)
sv_area_timer_2: Required force to capture CNH Area 2
sv_area_timer_3: Required force to capture CNH Area 3
sv_area_timer_4: Required force to capture CNH Area 4
sv_area_timer_5: Required force to capture CNH Area 5
sv_area_name_1: Name of CNH area 1 (default "Area 1")
sv_area_name_2: Name of CNH area 2
sv_area_name_3: Name of CNH area 3
sv_area_name_4: Name of CNH area 4
sv_area_name_5: Name of CNH area 5
sv_defender_timelimit: Time limit for CNH-Defender SubMod in minutes (default 7)
sv_cnh_timelimit: Time limit for CNH mod in minutes (default 30)
sv_cnh_broadcast_max_idle: Refreshtime of CNH broadcasts if nothing changed (default 3)
sv_cnh_cap_sound: Turn on/off capture sound (default 1)
sv_no_orders: Teams may capture any area without capturing the previous first (default 0)
sv_inf_red_defend: Objective Info: Red is defender
sv_inf_blue_defend: Objective Info: Blue is defender
sv_inf_red_attack: Objective Info: Red is attacker
sv_inf_blue_attack: Objective Info: Blue is attacker
sv_inf_order_on: Objective Info: Capture one after each other
sv_inf_order_off: Objective Info: Capture any area you like

sv_gametype: cnh (no resources -> all areas captures = win)
sv_gametype: def (no resources -> one team defend -> all areas captures = lose)
sv_gametype: con (resources -> the more areas you own the faster your points increase until scorelimit)

Chatcommands:
/help     - gives info regarding symbols and current objective
/rules    - just inform about current objective



Greetings,
Mo(2)

2

Re: [MOD] CNH

WOW! This sounds awesome!!! I will host this for sure.

-SALAD

3

Re: [MOD] CNH

Looks really nice and well done!

Not Luck, Just Magic.

4

Re: [MOD] CNH

What does CNH mean?^^
And could you implement any kind of graphics that shows who owns an area, like the colored flags in DOM?

5

Re: [MOD] CNH

Holy d*ck-diamonds! Sounds very cool!

My nickname in game: Dark Twist3r. My team: Eclipse
I use&support TDTW <3

6

Re: [MOD] CNH

Slayer *gV* wrote:

What does CNH mean?^^
And could you implement any kind of graphics that shows who owns an area, like the colored flags in DOM?

I think its "Capture and hold", right?

7

Re: [MOD] CNH

Slayer *gV* wrote:

What does CNH mean?

CNH means: "Capture 'n hold" (which is the basic objective of all possible modes).


And could you implement any kind of graphics that shows who owns an area, like the colored flags in DOM?

Maybe... My client did some strange stuff when it should render 2 flags of same color so I trashed the idea in the past. Afterwards I heard from DOM and that it seems possible some way but I never saw how that looked like in game, did not find the source and wondered how a "white flag" was possible coz the PNGs did not seem to include one.

8

Re: [MOD] CNH

As far as I know in DOM it was just a recoloured flag, that was integrated in the map as a tileset.

burn the land and boil the sea, you can't take the sky from me.

9 (edited by DARK HUNTER 2011-10-22 19:09:29)

Re: [MOD] CNH

I want to compile for windows but when I try to patch:

C:\a\teeworlds-b177-r50edfd37-source>patch -p1 --dry-run < cnh_beta.patch
missing header for unified diff at line 3 of patch
patching file src/game/cnh_mapitems.h
patching file src/game/collision.h
patching file src/game/collision.cpp
patching file src/game/variables.h
patching file src/game/server/gamecontext.cpp
patching file src/game/server/gamecontroller.h
patching file src/game/server/gamemodes/mod.h
patching file src/game/server/gamemodes/mod.cpp

C:\a\teeworlds-b177-r50edfd37-source>

Would the missing header be a problem?


EDIT:// I compiled: No problems! smile

Here you go:

Win32 binaries

I have not tested it though...

Once in a century...

10

Re: [MOD] CNH

Thx - Elite Tee. I guess this was just a warning of dry-run because the header file does not exist in normal TW (so a new file have to be created by patch).

11

Re: [MOD] CNH

Hmm.. Even when I really did it the missing header file error was present.

Once in a century...

12 (edited by Mo2 2011-10-23 00:40:09)

Re: [MOD] CNH

DARK HUNTER wrote:

Hmm.. Even when I really did it the missing header file error was present.

The only file that is not in the basic TW source (and that is on top of the patch - so line 3) is cnh_mapitems.h and that file is absolute necessary (it would not compile without). So I'm sure your patching was successful and the message you got was just info/warning of your windows patch version and no real error.

13 (edited by 2011-12-03 18:17:32)

Re: [MOD] CNH

Very nice work! I love to play it.

edit: what about adding ressource points?

Antoine de Saint Exupéry: It seems that perfection is reached not when there is nothing left to add, but when there is nothing left to take away.
Besides -  I am the gfx guy!

14

Re: [MOD] CNH

Sorry to bother, but the links in the OP are down. Does anyone have the source or a linux binary available?

15

Re: [MOD] CNH

I fell in love with it. <3
But - as Landil pointed out - I'm missing ressource points too.
Well, there are 2 diffrent ideas in my mind.
1. 'The classic one'
U've to gain controll over bases to earn points. More bases -> More Points. If you reach a amount of points (scorelimit) u'll win.

2. 'The BF one'
It's more like TDM. If you once gain controll over a base it's possible to spawn there. If you gain more bases than the foe, the foe will lose resources. You do start with a equal amounts of ressources & for every respawn u'll lose 1 point. If point scale reaches 0 you'll lose.

I do prefere the 1. 'classic' one.

Nevermind, it's your mod & it's your decision whether you'd like to add resources or not.

Greeting from Germany

16 (edited by Mo2 2011-12-12 21:33:21)

Re: [MOD] CNH

Nilaya wrote:

Sorry to bother, but the links in the OP are down. Does anyone have the source or a linux binary available?

Yes... sorry. My vHost provider stopped his service (and still have money from me for a month...). I'm still searching for a new one.
So currently this is the patch on pastebin: http://pastebin.com/download.php?i=qFYTgrXb

Do a "patch -p1 < downloadedpatch.txt" in a TW source folder extracted from teeworlds-0.6.1.tar.gz from this site (or probably a newer version from github -  I've tested with github version about 2 months ago). As usual without any warranty. I hope I've got an up 2 date version (cause even my main sources was on that vHost) ...but I'm pretty sure it's the last stable cause I've compiled for 32bit linux locally and only for 64bit on my vHost.



Theolol wrote:

1. 'The classic one'
U've to gain controll over bases to earn points. More bases -> More Points. If you reach a amount of points (scorelimit) u'll win.

Should be easy to implement. But what have that to do with resources?


2. 'The BF one'
It's more like TDM. If you once gain controll over a base it's possible to spawn there. If you gain more bases than the foe, the foe will lose resources. You do start with a equal amounts of ressources & for every respawn u'll lose 1 point. If point scale reaches 0 you'll lose.

I've thinked regarding that already. But I'm not sure if that would be fair? Maybe depends on the map.


Greetings,
Mo(2)

17

Re: [MOD] CNH

The Win32 executable doesn't work. Please read the PM I've sent you in hopes we can fix it.

Once in a century...

18 (edited by Theolol 2011-12-17 18:16:05)

Re: [MOD] CNH

Mo2 wrote:

But what have that to do with resources?

Well these points are the resources. ;-)
So you've to gain an amount of resources. And as I said I do prefere this methode more as the other one.
& As you pointed out it could may be unfair & it isn't - well - that whole resources concept (I'm talkin 'bout the 2#). It would turn into DM.
If it is added & I got time I'll maybe create a new map for it - perhaps hand in hand with you? wink
Greeting
Theo

19 (edited by 2012-01-01 00:54:35)

Re: [MOD] CNH

DARK HUNTER wrote:

The Win32 executable doesn't work. Please read the PM I've sent you in hopes we can fix it.

Finaly i've re-setup linux build environment. The patch that is uploaded here needs currently sv_gametype "mod" (otherwise it would run as DM). I'm pretty sure that would be the problem.

Theolol wrote:

Well these points are the resources. ;-)

Done. And I've even added "flag" in the points-area at lower right bottom to indicate if you own the current area or not (if both flags are blinking it's owned by nobody currently).


Following modes are available now:
sv_gametype: cnh (as usual without resources)
sv_gametype: def (without resources - one team have to defend one just attack)
sv_gametype: con (with resources)

20 (edited by Theolol 2012-01-08 13:53:17)

Re: [MOD] CNH

Nice job man :-)
But I'm afraid of the time of posting yikes

Edit: Could you perhaps upload a windows-version too? smile

21 (edited by Mo2 2012-02-09 22:56:35)

Re: [MOD] CNH

Theolol wrote:

Edit: Could you perhaps upload a windows-version too? smile

Added to first post.