Currently, I have been looking into Making an Tower Defense Game Mode. The Basic Idea is only Allowing Tower Type Structures to be build able and Having at least 16 Types of Towers. The General Tower Types Should Range Between Light, Heavy and Special type damages. Light Being Good vs Fast units and has rapid fire type attacks but is fairly weak on DPS, The next type being Heavy which is Tank style projectiles with lengthy Reload times and Special type Damage being it costs energy / mass to fire and has Very Long reload times. The Goal of this Idea is to Allow all players to start with 1 Commander that has 1 HP and is placed on the High ground while the enemy units spawn in a deep Cavern and try to path towards a activated Teleporter which leads to the players commanders, The goal of the game mode would be to kill X amount of waves to awaken the dormant Boss type unit and destroy the boss to win the match Only limitations, this idea is this idea it requires Custom Planets with a deep cavern / maze (easy enough), The Second requirement is Custom Player spawns for each system, The last requirement is being able to tell the AI to path towards the teleporter Regardless the amount of units it might Have alive. Other minor requirements that might be able to be solved with scripts is adding and linking the Teleporter to the correct Area. I would certainly would like @cola_colin, @stuart98, and everyone else that might be willing to help bring Use Map Settings Inspired game modes to Planetary Annihilation, I'm hoping this is a good idea is to try to make and I am hoping there will be enough interest from Other Programers and modelers to create interesting game modes that are similar to use map settings type maps from older games. Overall, I do think with Cola_Colin's mods this idea will be possible on some level.
Setup: Make a map with custom placed brushes, to get high/low we'd need to find the most suitable brush, but there should be one that is "okay" for it. It probably won't look super pretty though, as placing rotated brushes is a HUGE pain due to a missing preview for the rotation, so using a square brush would be easier, but less pretty. Next modify units to have super short range, so they cannot shoot up from the low ground to the high ground. Using server side scripts we can spawn units at some fixed location. I don't know if we have a way to do server side unit move commands. If not we need to have cheats enabled and use them to have the player's UI control the enemy AI units. Using my hidden-pip-camera trick we can give direct move commands. To have the player lose when too many units reach the commander I'd just balance out the unit dps vs the commander hp and main weapon. Spawning the player commanders in some place via a server-script isn't an issue. And then somebody needs to actually balance the whole thing...
Yeah, i have been working on the custom planet and your pretty much right it's difficult without actually knowing what each piece looks like with placement but with a little effort and a couple of mess up's, I got a semi-decent looking maze. as for Balance, I will be testing a few Sample towers later on. I was hoping @stuant98 would help with the projectile visuals overall as there "Awesome Projectiles" Mod is interesting and gave me a few ideas for making projectiles for the towers.
I spent most of this week end preparing the sample mod for further development @cola_colin. Though the more complicated scripts still need to be made such as The Waves script, AI Control script and Modifying Player spawns. Though what is done for the Sample mod is One custom planet with a decent maze, 3 Towers in each one of the roles such as light,heavy,special type towers and 3 Enemy types for the Wave progression. I will link to the github once, i finish testing and finalizing the Sample mod
So we can make pretty decent custom planets now. The only somewhat missing link is a way to tell enemy units to move to some location and attack a specific unit. The only hack I can imagine is to use a client side cheat that takes control of the units and commands them in secrct from the player. @Quitch You are our AI god, aren't you? Scenario: Boom bots are spawned in some location that has one single fixed path that ends at a commander. Can you make an AI that just has them straigt up attack that commander and not do anything else? If that can be done without any client side hacks we might actually be able to setup up modifed server with a transient server mod that allows anyone without extra mods (apart from PA Stats to see the server) to join and play. Spawning the units very likely can be done in a modified server script, as well as controlling the "you have lost/won" mechanics.
Transient server mods can shadow UI files. The server script also sends urls to the client - perhaps they don't have to be coui.
You may start with having the AI to build a base as normal, limit their AI code to build just factory, eco, and units, and they should progress t1, heavy t1, t2, and heavy t2, as normal. You could adjust their code to either ignore towers and/or prioritize your commander as much as possible so they rush it without caring about towers. You could even make the economy, so they can collect "metal" but you can't, but you can use towers to "reclaim" dead enemies. That in and of itself with adjustment would play as a tower defence to begin with. Tweaks would only make it better.
There is no point in have the AI build units. We can spawn in specifically modded units with server scripts just fine I think. The only issue is to get them to do what we want and nothing else. Setting up a scene (like matchmaking now...) on a server somewhere and have a PA mod (like PA Stats) that navigates towards it does work. .... but is pretty useless as PA heavily relies on the localstorage and sessionstorages and those are per host due to "I am a browser with secuirty features!" reasons. Sure since we control the js on both sides it can worked around, but it's ugly afaik.
Levels of difficulty is all. You can replace the AI entirely once you get a working first pass. I do sort of like the idea of getting eco from reclaiming dead enemies. Tower games usually get credits from dead enemies. Wish autoreclaim was a thing.
I think we can use a server side mod to spawn in buildings for players. Like resource generating buildings. Not sure if we can blow them up from the server side script as well. Probably not. Though we probably could solve that by spawning in something like an enemy boom bot that does enough damage to kill the building in the right place. Would give nice fireworks. So spawn in generatore that generates resources and kill it one second later. Or something like that. Considering the server script can react to "the commander I spawned in just died" it probably can react to "the unit of that attack wave I spawned in just died" as well. ... is what I hope. have not tested that
I'm not sure. One of the checks when forming a land platoon can be { "test_type":"CanAttackWithPoolUnitsLand", "string0":"WL_AnySurface", "string1":"WL_AnySurface", "unit_type_string0":"Mobile | Structure" } You then assign the platoon its task "task_type":"LandAttack" What I haven't tested is whether the platoon will target the unit specified in the test (you could make the unit_type_string0 = Commander). I would say no, that once the platoon is formed it's handed over the AI's hardcoded LandAttack task which then uses it in accordance with its other platoons, threat values, etc. I think the behaviour you want would need an AttackCommander task to be written. @sorian am I right in my thinking?
What if the AI units have unlimited vision range and there is only a single unit -the commander which has no gun, the AI is given boom bots that do 1 damage per hit- that they can attack as all other stuff on the field is for example tagged as "air" which the units under AI control cannot attack? Though I've seen AI units do weird voodoo dances in front of my commander instead of attack it.
Server script handles self-destruct on timeout and surrender. Only works for server-spawned units of course.
So a server script can spawn in units, kill them whenever it wants and detect they died? So who said we have no gameplay scripting at all? :>
I mainly haven't dug in because it requires a custom server, and I'm not exactly wanting for ideas that can be done without that additional difficulty ;^)
I wonder if it is possible to preload a custom server with a transient server mod. I'd guess not though.
If you changed your client's files the server should use this when hosting, correct? (I mean I server you're actually hosting)
Yeah that should be how it'll work, if you have the client on the computer running the server have the server mod the server should upload that to players who join automatically just like it would normally (without any mods to client)