Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

Strategy Scenario - Looking for help

Discussion in 'Modding' started by Mortisfire, Aug 20, 2015.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. Mortisfire Apprentice Engineer

    Messages:
    148
    Hey guys, lately I've been working on a scenario idea that I've had in my head since multiplayer was released. With the introduction of scenarios, I've realized that it's finally achievable. It has turned out, however, to be a much larger project than I originally assumed and so I was wondering if I could get some more people to co-author the scenario with me. I'm not sure if anyone would even be interested in this but if you are, here's what you need to know.

    What is it?
    A team vs team scenario that plays out similarly to a real-time strategy game, except the players are the individual units. i.e. Builder unit, miner unit, fighter unit, defense unit etc... Players will start with a main base, which will come stocked with a few builder\miner units and a few resources.

    Vehicles (Small/Large Ships) only can be built from projector blocks from within the structures. Placing blocks by hand is virtually disabled. Structures can be built by creating a "structure core" which projects the structure allowing it to be welded. Welding is extremely fast as all blocks will have their welding time set to nearly 0 allowing the speed of building a structure rely on teamwork. Structures are modular and have open ports on various sides for expansion.

    As Vehicles/Structures do require resources, miners will mine nearby asteroids and bring the minerals back to the base to be processed.

    In the end, the goal of the game is to destroy all structures of the enemy team. The blueprints that can be build will vary depending on what race the player chooses. Teamwork and a variety of attack/support vehicles should be the key to success, that way the game's goal isn't achieved by racing to whoever has the highest number of some overpowered ship.

    I think this would be a cool alternative game that players can turn to when they want a break from the survival aspect of space engineers.

    What are the unresolved problems?
    • I̶ ̶s̶t̶i̶l̶l̶ ̶n̶e̶e̶d̶ ̶t̶o̶ ̶f̶i̶g̶u̶r̶e̶ ̶o̶u̶t̶ ̶t̶h̶e̶ ̶b̶e̶s̶t̶ ̶w̶a̶y̶ ̶t̶o̶ ̶a̶t̶t̶a̶c̶h̶ ̶n̶e̶w̶ ̶s̶t̶r̶u̶c̶t̶u̶r̶e̶ ̶p̶a̶r̶t̶s̶ ̶t̶o̶ ̶p̶r̶e̶-̶e̶x̶i̶s̶t̶i̶n̶g̶ ̶s̶t̶r̶u̶c̶t̶u̶r̶e̶s̶.̶ ̶ ̶P̶e̶r̶h̶a̶p̶s̶ ̶a̶d̶d̶ ̶p̶r̶o̶j̶e̶c̶t̶o̶r̶s̶ ̶t̶o̶ ̶e̶a̶c̶h̶ ̶p̶o̶r̶t̶?̶ Yep, adding projectors to each port worked! I've written a mod to spawn vehicles from prefabs.
    • I don't know how I'm going to do vehicle production. Welding each vehicle individually with a welder ship is tedious, the pull-through method uses pistons which is bad for servers... really bad. Also I can't use the "spawn ship" feature because players would be able to spawn as many ships as often as they liked thus breaking the game. I could create a mod to place a prefab relative to a specific block. Same as vehicles, stations can be spawned parallell to each other.
    • I don't think there are any scenario victory conditions that would allow for "If faction has no powered structures for 'x' amount of time". Not sure if I can call victory from a mod.
    What needs to get done?

    Okay so if you read through all of that and you still feel like you want to join in on this, here's a list of the major things that need to be finished for a solid scenario.
    • Ship/structure design for at least two different races, both races having unique appearances and a specific playstyle. Not just reskins. This will definitely be the most time consuming.
    • Party Shield: A shield mod already exists, but to fulfill a support role some ships would need to be able to shield those within a certain radius.
    • Ion Blaster: A modded small ship gun that deals no damage but quickly depletes shields.

    If you're interested in providing any amount of help please post here. Also feel free to join the groupchat at http://steamcommunity.com/groups/SpengiesStrategyScenario.
     
    Last edited: Aug 24, 2015
    • Like Like x 1
  2. Mortisfire Apprentice Engineer

    Messages:
    148
    So I have made progress on my scenario mod. I've written a script that can spawn prefabs (both ships and stations) relative to an LCD screen. I am unable to figure out how I will charge the cost for purchasing a grid. and how I will store each cost for each different ship/station. Also, I still don't know how to automatically set how far each grid will be spawned based on how large it is, thus preventing overlapping grids.

    Here are some images of my progress:
    Modular Station with merge blocks.
    Add the Text Panel and type in the specifications. Prefab name;xyz offself; rotation
    prefab spawns and merges with the station

    As you can see, the prefab rotates and adjusts its spawn location based on the direction the LCD panel is facing. I changed no parameters between each of the spawns. Just the location of the LCD panel.

    This can also be easily applied to spawning a ship within the hangar. This functionality can be paired with an LCD menu system where the user can select the station/ship the want. The programmable block will then send the correct parameters to the LCD block, the mod will then check if connected containers have enough resources and if so, the prefab will be pasted.
     
    Last edited: Aug 24, 2015
  3. Mortisfire Apprentice Engineer

    Messages:
    148
    Here is the code if anyone is interested. It's very sloppy and a patchwork of snippets taken from mods like evil sensor, mission blocks, and Midspace's admin helper. Any help or suggestions would be much appreciated.
     
  4. Ihana_Mies Trainee Engineer

    Messages:
    74
    This seems like a marvelous idea! I'd like to help, but I'm not good at designing ships so I'll pass it to someone else :p

    Vehicle production could work with modded welder inside the facility by increasing welding area to cover it whole. There should also be a sound warning to players not enter the area or else they get killed.
     
  5. Mortisfire Apprentice Engineer

    Messages:
    148
    Ihana, vehicle production can work the same way as my station spawner. Just spawn it directly into the world if the grid that the Text Panel is connected to has inventories with enough resources. Then remove those resources. I am really stretching myself to the limit here with my coding abilities so I could use the help of someone with more knowledge. Let me know if there is another area you'd be interested in helping out with. Even if you don't think you are very good at it, this project is going to need all of the help it can get to get itself out the door.
     
  6. Mortisfire Apprentice Engineer

    Messages:
    148
    Thought I'd share some video progress as well. Notice how the grid is flush against the side of the LCD panel?

     
  7. soknorb Trainee Engineer

    Messages:
    65
    thats awesome man!
     
  8. Mortisfire Apprentice Engineer

    Messages:
    148
    Thanks, I can always use help!
     
  9. soknorb Trainee Engineer

    Messages:
    65
    for performance, I'd recommend not running the mod every simulation because it is just not nessessary, each simulation is extremely fast and you can test that by doing a couple timed runs. either way. if you just throw in a var ticks = 0; and ticks++ each simulation then you can make your each simulation method run like this
    if(ticks%20==0)
    RunMyMainCode();
    also put these returns at the top of your method so that only valid sessions run the mod, and so that only the host runs the mod

    public override void UpdateBeforeSimulation()
    {
    if (!MyAPIGateway.Multiplayer.IsServer)
    return;

    if (MyAPIGateway.Session == null)
    return;
     
  10. Mortisfire Apprentice Engineer

    Messages:
    148
    Hey, just made a move to the United States so sorry for the delayed response.

    Right, it only needs to run every 20 ticks.
     
Thread Status:
This last post in this thread was made more than 31 days old.