Create Invader with API call.
-
"Create Invader" with API call.
There's an invader test system in the client. It tells the server to create a fake invader (You can just poof it be selecting it, and it drops no loot, etc.) It's just for testing.
But creating a SQUAD of them is a pain in the butt. So if you want to test something well above the scale of a couple invaders, it's difficult.
Add an API call for it. You can issue it several times if need be, in case it needs to be only one new one per tick or something... simply by looping once through your routine per tick. At the same time, you can be programatically keeping your towers from doing anything until it's done for maximum effect.
Better yet, use the same code the server uses to gen up a squad, just tell it the parameters. They'll still be test dummies, of course, subject to the same rules as the ones the UI makes.
-
Give your darn post a title. Makes it very hard to click on...
In any case, I think a better idea is to remove this interface altogether. It serves little point and opens up possible exploits.
-
Doh! I didn't even notice it didn't have a title. Why would I even be able to make a topic without a title?
As to the interface's usefulness... it serves as a useful way to test certain levels of combat code, a purpose that would be better served with creating squads all at once.
As to it's potential exploits... it already won't let you add the invaders when there are other hostiles in the room. That seems sufficient.
-
@smokeman said in Create Invader with API call.:
As to it's potential exploits... it already won't let you add the invaders when there are other hostiles in the room. That seems sufficient.
If I know the enemy is one tile off the border in the neigbouring room I could spam the biggest invaders I can on the border for him to walk in to when he steps in.
I reckon as soon as you allow this to be automated then people will start using it for defense.
-
Spawned invaders automatically die when another player enters the room iirc
-
You can already automate this with HTTP requests if you have a script running on your own machine.
The endpoint is: [POST]
https://screeps.com/api/game/create-invader
.Parameter is:
{ room: ROOM_NAME, shard: SHARD_NAME, size: "small" | "big", type: "Melee" | "Ranged" | "Healer", boosted?: true }
-
Creating an api for this should be a straightforward client-abuse. I've never hacked on the the create invaders code, but there isn't anything you can do in the client that you can't get client-abuse to do for you.