Welcome, Guest. Please login or register.
Did you miss your activation email?
July 15, 2019, 09:31:48 pm

Login with username, password and session length
Search:     Advanced search
Savage: XR is a new patch for Savage, created by the Newerth.com staff. The XR1.1 Client is out now! Download it now!
189902 Posts in 11001 Topics by 18343 Members
Latest Member: JamesMop
* Home Forum Wiki Help Search Login Register
+  Newerth Forums
|-+  Savage XR
| |-+  General Savage XR Discussion
| | |-+  Commander script
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Commander script  (Read 942 times)
Bullet
Python enthusiast
Newerth Donator
Sr. Member
****
Posts: 352



View Profile
« on: March 08, 2017, 06:45:01 pm »

I have a simple idea for a script to be used while you are commander.


The idea is the following:

- When team gold is low, change tax-rate higher
- When team gold is high, change tax rate to lower

The basic concept for this is stable economy, and not to avoid a un-stable economy (gold starve one minute, then rich the next).

My two questions:
1. Is this possible to achieve with a python script, as a client?
     - Can you retrieve the team gold trough the API ?
     - Can you make it refresh frequently (every N-th second)?
     - Can you retrieve the tax-rate and change the commander tax-rate trough python scripting? (there isnt a whole lot of docs around the python scripting posibilities)
2. Would it be considered cheating ?

Logged

Hakugei
XR Coder
Legendary Member
***
Posts: 3842



View Profile
« Reply #1 on: March 08, 2017, 07:12:29 pm »

1. Is this possible to achieve with a python script, as a client?
     - Can you retrieve the team gold trough the API ?
     - Can you make it refresh frequently (every N-th second)?
     - Can you retrieve the tax-rate and change the commander tax-rate trough python scripting?
I suppose it's possible.
- Yes, resource_# (# being the resource index).
- Yes.
- Probably, using the client command.
2. Would it be considered cheating?
Automating something that gives you an advantage over others? Yes. Rolleyes

So, if someone scripts it, it's best to add it to XR officially instead so that everyone has it available and there are no unfair advantages.
Logged
Bullet
Python enthusiast
Newerth Donator
Sr. Member
****
Posts: 352



View Profile
« Reply #2 on: March 08, 2017, 07:24:52 pm »

I believe such a script can make commanding significantly easier for newbies  Smiley Maybe I will try to look into this just for the sake of learning
Logged

Hakugei
XR Coder
Legendary Member
***
Posts: 3842



View Profile
« Reply #3 on: March 08, 2017, 07:48:56 pm »

I believe such a script can make commanding significantly easier for newbies  Smiley
Yes, and add it to the options menu for those that want to enable it.
No problem then.  Afro
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.035 seconds with 20 queries.