1 (edited by LordSk 2009-12-30 11:12:22)

Topic: [MOD] HpRace 2.0

HpRace 2.0

Description :

HpRace is a cooperative Race mod. Indeed, you can't finish a hprace map alone, you need your partner to cross obstacles. That is a good alternative for race mod, because you don't need to have so much skills to begin, the only thing that you must know is : team job.
One of the 2 players is the shooter, he hits his partner with the hammer propel him.
The other, in the same time have to hook the shooter to both fly and touch the end line.

New freatures since 1.5 :

  • Team colorization (for a better look)

  • Better and smooth collisions

  • Hammer aim (the shooter must aim now)

  • New use of /with (explained later)

  • /tuto replaced by /help, /show_others added

  • Minor bugs fixed and minors improovements

How to use /with :

/with command was a bit hard for newbies to use. I simplified it then.
Now you just have do write : /with partofnameyouwant
For example : /with lord will ask me if i am here of course.
To quit your partner write : /without

Commands :

  • /with

  • /without

  • /help

  • /show_others (which hide other players)

  • And all Race commands.

Race mod is inclued.

Thanks to :

Sushi Tee, for server hosting, debug and testing.
JLou of course who tests always with me.
Every person i forget.

Download :

http://solidfiles.com/info_imgs/gRey.jpg

lordskelethom - want to reach me quickly? https://discord.gg/teeworlds

2

Re: [MOD] HpRace 2.0

nice new features i love hprace smile but sometimes its hard to get a good aprtner big_smile

3

Re: [MOD] HpRace 2.0

The best mod ever got even better^^

Good job.

Qi - high level gaming
qi.m0g.net

4

Re: [MOD] HpRace 2.0

hehe finally ^^


i allready updated all my hprace server ^^
come and play on duZi servers lol

uptee - a simple web interface for hosting and maintaining teeworlds servers
teerace - a website gathering results of trusted Race-mod servers providing global ranking and statistics
*gV* rox ^^

5

Re: [MOD] HpRace 2.0

Updated [Krypton] HP-Race Server yesterday

added new maps from don't know

hprace_atSun
hprace_slitup
hprace_moonlight
hprace_dk

And Lord, good job dude smile

6

Re: [MOD] HpRace 2.0

Very nice mod lordskelethom. smile

Give others the respect you wish to be respected with. In the mean time, enjoy the website!

7

Re: [MOD] HpRace 2.0

HpRace 2.0 for Mac:
http://eigan.no/tee/hprace/
(use that as the Download link.. I want people to see the site !)

MertenNor

->My 24/7 servers: [NOR] Norwegian HUB <- Back Online !! big_smile
( My grammar is getting better ! smile I think.. )
-Norway

8 (edited by erd 2010-06-03 14:04:58)

Re: [MOD] HpRace 2.0

Hey lordskelethom,

First big thanks for this great mod, really like it! But maybe you know this little, but  very annoying bug too:

Player A writes "/with B"
Player B doesnt write /yes or /no
Player A writes "/with C"
Player C writes /yes... and then Player B too.

Now, there are - more or less - three players in one team. I saw in the source that the following part should prevent this:

                else if(p->get_partner())
                {
                    char buf[256];
                    str_format(buf, sizeof(buf), "%s chose another partner.",server_clientname(p->asked));
                    game.send_chat_target(client_id, buf);
                }

Change it to:

                else if(game.players[p->asked]->get_partner())
                {
                    char buf[256];
                    str_format(buf, sizeof(buf), "%s chose another partner.",server_clientname(p->asked));
                    game.send_chat_target(client_id, buf);
                }

By the way, two additional suggestions:
Change in variables.hpp:

MACRO_CONFIG_INT(sv_hampower, 1, 1, 500, CFGFLAG_SERVER, "Hammer's power")

to

MACRO_CONFIG_INT(sv_hampower, 5, 0, 500, CFGFLAG_SERVER, "Hammer's power")

And remove from hprace.cpp:

config.sv_hampower = 5;

Why the first change? Because if you want to play dummydrags as HpRACE, you cant deactivate the hammer, and player fly up instand of dummy dragging.
Why the second change? If you want to host on one server dummydrag and normal hprace maps, you have to change the hammerpower for the maps individually. This can be done with the exec command. But if the hammerpower is set in hprace.cpp, it will only changed if the exec command is run a second time on the same map, because on the map change it takes the value from hprace.cpp.

If someone is interested in new features for HpRACE:
1. Whitefire and I, with the help of Oy (http://www.teeworlds.com/forum/viewtopi … 818#p50818) are working at an information which appears when someone writes /id, and shows an example with one player who has no partner.
2. You know the annoying people, who join the server and dont know how to play hprace and dont even understand how to get a partner because they dont read the /help, and they ask you the whole time what to do and you dont want to waste your time explainig it to them? Take my small mod and write into the rcon "set_hpteam ID1 ID2" and you're done ;-)
Posting the code of the two features would be a bit much, so please tell me if you are interested.

Hope my post is usefull... :-)

Greets,
erd

9

Re: [MOD] HpRace 2.0

Well, it seems that you found a bug, thanks you.
For the hammer's power, i don't agree.
I voluntarily forced it to 5 because this mod is called HpRACE.
If you want to do a dummydrag mod, you can modify the HpRACE mod, if you give credits to me.
The rest is interesting yes, and this rcon command is a good idea.

lordskelethom - want to reach me quickly? https://discord.gg/teeworlds

10 (edited by erd 2009-08-21 21:00:30)

Re: [MOD] HpRace 2.0

lordskelethom wrote:

For the hammer's power, i don't agree.
I voluntarily forced it to 5 because this mod is called HpRACE.
If you want to do a dummydrag mod, you can modify the HpRACE mod, if you give credits to me.

Okay, for me race and dummydrag is nearly the same, so i thought it could be an improvement :-D

lordskelethom wrote:

The rest is interesting yes, and this rcon command is a good idea.

Here are two patchfiles, one for patching the original 0.5.1 source, the other one to patch your hprace. It contains the bugfix and the rcon command.
Patch everything: http://pastebin.com/f591af8a
Patch HpRACE: http://pastebin.com/f29c28ffe
By the way, i cant find the parameters to let the patchfile look like yours... would be nice if you give me the exactly command for diff, i used "diff -ur ./ ../hpracefixed/ > ../file.patch" in the directory with the original source (linux).

Because the "/id" command is not working properly (sometimes no example is shown if you have the id 0), here only the code snippet:

            else if(!strcmp(msg->message, "/id")  && game.controller->is_race())
            {
                if(game.players[client_id]->get_partner())
                {
                    char buf[512];
                    str_format(buf, sizeof(buf), "You have already a partner (%s).",server_clientname(p->get_partner()->client_id));
                    game.send_chat_target(client_id,buf);
                    return;
                }
                char buf[512];
                str_format(buf, sizeof(buf), "This is version 2 of HpRACE. The command \"/id\" is not used anymore. You can directly type the name (or a part of the name) of your partner.");
                game.send_chat_target(client_id,buf);
                for(int i = 0; i <= MAX_CLIENTS; ++i)
                {
                    const int randomID = (i + server_tick()) % 2;

                    if(randomID != client_id && game.players[randomID] && !game.players[randomID]->get_partner())
                    {
                        str_format(buf, sizeof(buf), "Example: \"/with %s\"", server_clientname(randomID));
                        game.send_chat_target(client_id, buf);
                        break;
                    }
                    else if(i == MAX_CLIENTS)
                    {
                        str_format(buf, sizeof(buf), "Sorry, there is no free player. Please be patient");
                        game.send_chat_target(client_id, buf);
                        break;
                    }
                }

            }

Like above said, credits to Whitefire and Oy for "/id".

11

Re: [MOD] HpRace 2.0

Hi, I want to do a MOD based on your's ^^. But, I can't make working your patch hmm. I downloaded patchutils for Windows from gnuwin32 but it says :

C:\Documents and Settings\Paul\Bureau\twmod\syncrace>patch < hprace2.0.patch
can't find file to patch at input line 5
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|Index: src/engine/e_if_server.h
|===================================================================
|--- src/engine/e_if_server.h   (rÚvision 1984)
|+++ src/engine/e_if_server.h   (copie de travail)
--------------------------
File to patch:
C:\Documents and Settings\Paul\Bureau\twmod\syncrace>patch -p0 < hprace2.0.patch

patching file src/engine/e_if_server.h
patching file src/engine/server/es_server.c
missing header for unified diff at line 68 of patch
can't find file to patch at input line 68
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|34 @@
|                               return;
|                       }
|
|+                      /*slot*/
|+                      if(cid >= netserver_max_clients(net)-config.sv_reserved_
slots && config.sv_reserved_slots_pass[0] != 0 && strcmp(config.sv_reserved_slot
s_pass, password) != 0)
|+                      {
|+                              netserver_drop(net, cid, "server is full");
|+                              return;
|+                      }
|+
|+                      if(!config.sv_multiconnect)
|+                      {
|+                              netserver_client_addr(net, cid, &addr);
|+                              sprintf(ip, "%d.%d.%d.%d", addr.ip[0], addr.ip[1
], addr.ip[2], addr.ip[3]);
|+                              for(i=0; i<MAX_CLIENTS; i++)
|+                              {
|+                                      mem_zero(&tmpip, sizeof(tmpip));
|+                                      if(clients[i].state > SRVCLIENT_STATE_RE
ADY)
|+                                      {
|+                                              netserver_client_addr(net, i, &t
mpaddr);
|+                                              sprintf(tmpip, "%d.%d.%d.%d", tm
paddr.ip[0], tmpaddr.ip[1], tmpaddr.ip[2], tmpaddr.ip[3]);
|+                                              if(strcmp(ip, tmpip) == 0)
|+                                              {
|+                                                      netserver_drop(net, cid,
 "You already are connected on this server");
|+                                                      dbg_msg("ip","'%s'='%s'"
,ip, tmpip);
|+                                                      return;
|+                                              }
|+                                      }
|+                              }
|+                      }
|+
|                       clients[cid].state = SRVCLIENT_STATE_CONNECTING;
|                       server_send_map(cid);
|               }
--------------------------
File to patch:

Could you upload a zip file of the source smile ?
Thanks.

12

Re: [MOD] HpRace 2.0

Read the error message

Perhaps you should have used the -p or --strip option?

Try -p0 or -p1

13

Re: [MOD] HpRace 2.0

reupload servers please< lord you urls don't work (((

RailGun!

14

Re: [MOD] HpRace 2.0

Foma wrote:

reupload servers please< lord you urls don't work (((

I am working on a 2.1 atm, and i will reupload soon smile.

lordskelethom - want to reach me quickly? https://discord.gg/teeworlds

15

Re: [MOD] HpRace 2.0

we wait you ^_^

Please do not bump topics unless there's is something usefull to add. Things won't happen any faster and it will only cause lot's of spam on the forum. // ~{MS}~ Azon

RailGun!

16

Re: [MOD] HpRace 2.0

We wait a HpTDM bug fixing too big_smile

Not Luck, Just Magic.

17

Re: [MOD] HpRace 2.0

update download links plz

Teeworlds [ friends ] clan
Some YouTube Stuff about Teeworlds

18

Re: [MOD] HpRace 2.0

Done, this version still is called 2.0 even i did some few changes.

lordskelethom - want to reach me quickly? https://discord.gg/teeworlds

19

Re: [MOD] HpRace 2.0

isnt it for windows? sad    giveme an exe. plsssss wink

Please use your signature to advertise your clan, not every topic. // ~{MS}~ Azon

20

Re: [MOD] HpRace 2.0

You can compile it yourself.

Not Luck, Just Magic.

21

Re: [MOD] HpRace 2.0

how??

22

Re: [MOD] HpRace 2.0

i can compile it when i have some time (weekend)
0.5.1 or 0.5.2 or 0.5.0?

23 (edited by Kottizen 2010-03-10 19:02:23)

Re: [MOD] HpRace 2.0

Linux x86_64:
http://solidfiles.com/info_imgs/f2c67164814e3efb530a4a0f76e9d8e8.jpg

Linux x86:
http://solidfiles.com/info_imgs/0DCO.jpg

24 (edited by ich1234566 2010-03-25 14:06:46)

Re: [MOD] HpRace 2.0

windows plzzz... i dont know how to compile.. pls help
teewolrds 0.5.2

25

Re: [MOD] HpRace 2.0

Inofficial but fast as hell download mirror, directly downloadable:
http://teeworlds.secu.in/hprace

Official hoster of the Lvl|x servers | lvlx.org
Mirroring popular Mods at teeworlds.secu.in
Hosting tons of Servers on my Gbit Root