Author Topic: Advanced CTF (Current version: 0.6)  (Read 4792 times)

0 Members and 1 Guest are viewing this topic.

Offline Shoozza

  • Retired Soldat Developer
  • Veteran
  • ******
  • Posts: 1632
  • Soldat's Babysitter
    • Website
Re: Advanced CTF
« Reply #20 on: May 12, 2013, 09:34:46 am »
@DarkCrusade
Actually I don't think you need to care if the script is similar to another one. It looks like Adam won't host any servers with your script so no need to convince him ;)
Also this is getting somewhat repetitive.

I wasn't following the entire thread, but you really have to get the balance right or close to the end of the round some people would be almost invincible ;)

Btw for keeping the players progress I suggest using HWIDs and not only nicknames as that could be abused.
« Last Edit: May 12, 2013, 09:42:17 am by Shoozza »
Rules
Tools: ARSSE - SARS - SRB - chatMod

DarkCrusade

  • Guest
Re: Advanced CTF
« Reply #21 on: May 12, 2013, 09:47:29 am »
@Shoozza: I agree that balancing this mod will be pretty hard; especially, when someone joins in the middle of the match. My ideas for this are that the standard maximum health of players increases over time, which is also the lowest amount of health they can drop to from dying. Additionally, players who are far behind would get a higher boost of health for killing someone with a big health pool, while the other player drops lower than normally. Fortunatly, most of the bonus rewards from scoring help the entire team and do not make one single player invincible, although I can see "Revive" being the best tool for cappers. The only thing I am unhappy about right now is that the auto-turret can only shoot once a second due to threads being too instable.. is there any work-around?

I also agree that there will be abuse wherever possible, so HWIDs truly are the way to go for my slot system.

Offline Shoozza

  • Retired Soldat Developer
  • Veteran
  • ******
  • Posts: 1632
  • Soldat's Babysitter
    • Website
Re: Advanced CTF
« Reply #22 on: May 12, 2013, 10:12:55 am »
The only thing I am unhappy about right now is that the auto-turret can only shoot once a second due to threads being too instable.. is there any work-around?
Not sure if there is a solution (didn't know about this problem before). Maybe Falcon knows more about it.
Rules
Tools: ARSSE - SARS - SRB - chatMod

Offline Leo

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1011
Re: Advanced CTF
« Reply #23 on: May 12, 2013, 03:52:25 pm »
If this works for realistic I shall give it a try if you agree. You can find me at #lrs

Offline Moroes

  • Soldier
  • **
  • Posts: 165
    • Soldat-Game.eu
Re: Advanced CTF
« Reply #24 on: May 12, 2013, 04:22:32 pm »
The only thing I am unhappy about right now is that the auto-turret can only shoot once a second due to threads being too instable.. is there any work-around?

What about app on idle timer?
Maybe I am wrong, I dunno scripting well.

Offline Bonecrusher

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1397
  • High above
    • Zabijaka.pl
Re: Advanced CTF
« Reply #25 on: May 12, 2013, 06:25:28 pm »
Im constantly looking for new server ideas but its worth mentioning that players kind of stepped back from modded servers to vanilla ctf. Let's hope your script will be enough to convince them to atleast give it a try ;p

Im chill like that

DarkCrusade

  • Guest
Re: Advanced CTF
« Reply #26 on: May 14, 2013, 06:26:53 am »
@Moroes: Apponidle is a function that is called once a second. To use threads, I have to use a function called sleep to get the wanted effect. However, using it makes the server crash most of the time, so it was disabled. If it is ever fixed, things like homing missiles will be possible, and my turret could shoot as often as I wanted.

@Bonecrusher/Leo: I'll develop the script until it is ready for the public, which is when I will send both of you a .zip with the script ;)
« Last Edit: May 14, 2013, 06:56:26 am by DarkCrusade »

Offline chutem

  • Veteran
  • *****
  • Posts: 1119
Re: Advanced CTF
« Reply #27 on: May 14, 2013, 07:18:00 am »
What happened to the modified server which you could change the frequency apponidle is called? (it also let you do multicoloured console prints and server messages without *SERVER* iirc, used on this server)
Also there is always having a dummy bot with bullets spawning on him, but that means making separate versions of every map...
« Last Edit: May 14, 2013, 07:20:53 am by chutem »
1NK3FbdNtH6jNH4dc1fzuvd4ruVdMQABvs

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: Advanced CTF
« Reply #28 on: May 14, 2013, 07:37:49 am »
AppOnIdle frequency can be adjusted by the script using AppOnIdleTimer variable since 2.7.3
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline Moroes

  • Soldier
  • **
  • Posts: 165
    • Soldat-Game.eu
Re: Advanced CTF
« Reply #29 on: May 14, 2013, 05:17:50 pm »
^ Thats what I was talking about. No threads needed. You can make it faster than just once per second.

DarkCrusade

  • Guest
Re: Advanced CTF
« Reply #30 on: May 17, 2013, 07:22:16 am »
Thanks for the tip, guys. I have not worked with global constants yet. How do I declare them best? Can I just do something like

Code: (pascal) [Select]
const
 apponidletimer=30;
 maxplayers=6;

// Or do I have to do this

procedure activateserver();
begin
 apponidletimer:=30;
 maxplayers:=6;
end;

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: Advanced CTF
« Reply #31 on: May 17, 2013, 07:57:21 am »
First of all, these are not global constants, but global variables. You can set them anytime during runtime.
Second, they're preset and defined by API, so you don't need to declare them at all. Just set them somewhere, like:
Code: [Select]
procedure ActivateServer();
begin
  AppOnIdleTimer := 30;
end;
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline JotEmI

  • Soldier
  • **
  • Posts: 188
Re: Advanced CTF
« Reply #32 on: May 17, 2013, 08:15:26 am »
First of all, these are not global constants, but global variables. You can set them anytime during runtime.
Second, they're preset and defined by API, so you don't need to declare them at all. Just set them somewhere, like:
Code: [Select]
procedure ActivateServer();
begin
  AppOnIdleTimer := 30;
end;

Actually, setting AppOnIdleTimer in ActivateServer() sometimes generates "unknown identifier" errors. Try something like this:

Code: [Select]
var
test: boolean;

procedure ActivateServer();
begin
     ...
    test:=true;
end;

procedure AppOnIdle(Ticks: integer)
begin
    if(Ticks mod(60)=0)then
    begin
         if(test) then
         begin
             AppOnIdleTimer:=30;
             test:=false;
         end;
    end;
end;

DarkCrusade

  • Guest
Re: Advanced CTF
« Reply #33 on: May 19, 2013, 07:13:33 am »
I have a problem with the calculation of damage that is dealt to players that I am unable to fix.

The situation:

Player A deals x damage to player B.
Player B's HP are 300. X is substracted.
Player B's real health of course is much lower, so I want to display the health loss as a percentage.
My damage formula to translate from theoretical, scripted health to real health is

Real damage = damage * (theo. hp / theo. maxhp) * (150 / theo. hp);

There is nothign wrong with the formula, but there still seems to be some kind of bug which I cannot find. However, I can start the server normally without it shutting down immediatly.

Important procedures:

OnPlayerDamage() - line 672
CalcDamage() - line 484
RefreshHealthbar() - line 294

Please give me advice in how to deal with such problems as I am inexperienced with debugging, and especially in Pascal. If anyone can track the bug down, he'll appear in the credits if that means anything to you :P
« Last Edit: May 29, 2013, 03:43:04 am by DarkCrusade »

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: Advanced CTF
« Reply #34 on: May 19, 2013, 07:32:22 am »
This can be shorten to damage = damage * (150/theo.maxhp);
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

DarkCrusade

  • Guest
Re: Advanced CTF (Updated)
« Reply #35 on: May 29, 2013, 03:42:36 am »
I have completly rewritten the script as I was unhappy with the way everything worked. The script is far more efficient now. It actually dropped from 900 lines to 600, although it has more features now. Read the first post for more detail on the update!

Offline Bonecrusher

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1397
  • High above
    • Zabijaka.pl
Re: Advanced CTF (Updated)
« Reply #36 on: May 29, 2013, 02:00:36 pm »
Server Name Zabijaka.pl [CTF]ADV
Server IP 79.133.192.44:23036

Im chill like that

Offline skrX

  • Soldier
  • **
  • Posts: 112
  • x ye.
Re: Advanced CTF (Updated)
« Reply #37 on: May 30, 2013, 05:38:59 am »
@DarkCrusade: you can add simple ranking system with points + register and log to account. Players like to compete.
« Last Edit: May 30, 2013, 05:43:32 am by skrX »

DarkCrusade

  • Guest
Re: Advanced CTF (Updated)
« Reply #38 on: May 30, 2013, 10:56:06 am »
UPDATE (v0.4):
+ New: You get one bonus for every 10 kills now.
+ Fixed: Mines spawning now in the right places
+ Fixed: Automatic turret's damage and speed is fixed. Spawning in the right place now
+ Fixed: Nuclear belt now will blow up the wearer, not the killer.
+ Fixed: Text files will be displayed correctly now.
+ Tweaked: HP regeneration is weaker now.
+ Tweaked: Nuclear belt buffed. You get 2 now!
+ Tweaked: The HUD will be much more convenient. Turn it on/off by typing !toggle
+ Tweaked: HP will be capped at 500 now.
+ Tweaked: HP gains decreased, and loss upon death increased

The next version will include limitation to M79 and M72 for the sake of not being one-hitted all day long. The server we tested the script on went from full-auto to full-tube in half the blink of an eye. Yes, balance is a bitch. Whoever can give me feedback on the balance or give me new ideas for features is very welcome.

Offline Maniek

  • Major(1)
  • Posts: 30
Re: Advanced CTF (Updated)
« Reply #39 on: May 31, 2013, 02:51:46 am »
I played a little and and what angered me the most is cheaters. I just downloaded soldat started to play and saw some shitty teleports and inf ammo.
About balance well.
Weapons like barrett, mp5, steyr are fine at the begining, but when players reach more hp they become less powerful. Instead of them for example ak and spas gets advantage. And I don't know what can balance it. Also playing with m79, when im scoring I dont fell this whole bonuses. But when I'll pick up this other ones like spas, all bonuses are useful but losing them becouse of dieing is very painful.
« Last Edit: May 31, 2013, 02:54:54 am by Maniek »