Welcome

Please register for Total War Access to use the forums. If you're an existing user, your forum details will be merged with Total War Access if you register with the same email or username. For more information please read our FAQ’s here.

Spectator Mod

HambangoHambango Junior MemberPosts: 60Registered Users
edited January 12 in Community Mod Section
Hi guys,


I know that TW is all about the battles, but sometimes I like to just sit back and watch the carnage >:)
So I made this little mod for myself and thought I'd share it with you.

So, what does it do?
After the escape key on your keyboard is pressed during the deployment phase of a battle, the mod will give the control of your army to the AI once the battle starts, making you a spectator.
You can still issue orders, but they will probably be overruled pretty quickly.
It works with custom battles and with campaign battles. I've left quest and intro battles untouched.


I know the solution with the escape key is a little crude, but I haven't found a way to modify the UI to add a proper toggle, nor to use another key.
Also, I'm not a programmer and have zero experience with lua, so please forgive if my coding style isn't the best :*

Judging by the little I've tested it seems to work quite well. There might still be some bugs I haven't stumbled upon, however.
I have no clue of what it does in multiplayer, or if it works at all.
It should be compatible with pretty much any other mod out there.

I'm posting here because I don't have the time to properly maintain a mod on Steam workshop, so if anyone wants to polish and publish the mod themselves, go ahead! No credit needs to be given.


Have fun!

EDIT:
Many thanks to john_vindley for publishing the mod on Steam!

Steam Workshop link: http://steamcommunity.com/sharedfiles/filedetails/?id=874350931


Download links:
v 1.0: http://www.mediafire.com/file/63f51puafgri8zh/spectator.zip

v 1.1: http://www.mediafire.com/file/vd45s88avxw5arg/spectator_mode_1_1_2.zip

v1.2: http://www.mediafire.com/file/pbcuz9utrvn5z63/ai_general_1_2_6.zip
«13

Comments

  • Alaric83Alaric83 Posts: 72Registered Users
    That sounds like a great mod! Could anybody upload it to the Steam Workshop ? :D

    Anyway, thank you so much for this mod (even though I have yet to test it)
  • kelstrkelstr Posts: 278Registered Users, Cakes!
    Why not fight the battle, and save the replay? "just a thought"
    Mind you I can kinda see the thought behind this and it could be quite fun too.
    Please post it to steam, so we can all download it.
  • Leri_weillLeri_weill Posts: 1Registered Users
    Is there a way to regain command of your troops during the battle ? Anyway, I'll give it a go :p
  • HambangoHambango Junior Member Posts: 60Registered Users
    No, I left that out intentionally.
    Switching it on and off felt like too much of a cheat to me.
    I wanted to have to commit to one way or the other at the start of the battle.
    Hope you enjoy it anyway :smile:
  • AWNTAWNT Posts: 4Registered Users
    Fantastic mod..wonder if any clever person can get it into the UI aswell..
  • HambangoHambango Junior Member Posts: 60Registered Users
    Glad you like it!
    I don't think it can be integrated into the UI. I believe it's not possible to add new GUI elements through modding.
    I could be wrong, though.
  • AWNTAWNT Posts: 4Registered Users
    Made the game an instant classic for me this mod..again thanks
  • john_vindleyjohn_vindley Posts: 19Registered Users
    Hello Hambango,

    My compliments for your amazing mod. I wanted to let you know that I have uploaded it on the Steam Workshop titled "Spectator Mode". All credit goes to you of course in my very first sentence in the description. If you want, please add me on Steam, so I can add you as a contributor (though you are the sole creator of this).

    Also, I would like to know how you can add the "switch the AI on and off during battle" that someone asked earlier. Some people have asked for it in the comments of the mod.

    Cheers and thanks again for the mod.

    Deco
  • Overlord WrathOverlord Wrath Posts: 1Registered Users
    Glorious **** mod.
  • HambangoHambango Junior Member Posts: 60Registered Users
    Hi John,

    thank you for publishing my mod! Very much appreciated. Nice picture btw, very fitting :D
    You didn't have to credit me, though. It's free to whoever wants to tinker around with it.
    I didn't think there'd be much demand for it, but it seems a good number of people are enjoying it.

    I'd prefer to stay anonymous on steam, if you don't mind. I'm not overly fond of Steam and only use it when I don't have a choice (like in TWWs case). Its social media aspect I don't use at all.
    But feel free to contact me anytime on this thread or send me a pm. I'm happy to help!

    I'm currently at work, but when I'm at home this evening I'll have a look at my files.
    I'll also try to fix the problems with reinforcements and summons some users reported.
    This could take quite some time, however. There's no documentation on this stuff and figuring it out from scratch isn't easy.

    Have a good one!
  • john_vindleyjohn_vindley Posts: 19Registered Users
    edited March 6
    *deleted*
    Post edited by john_vindley on
  • john_vindleyjohn_vindley Posts: 19Registered Users
    edited March 2
    @Hambango No need to thank me, I just felt that this wonderful mod should be shared with as many people as possible. I only asked you to join as a contributor since you are the actual author, but no worries, I respect your wish to remain anonymous.

    I greatly appreciate your desire to improve this mod even further. I will help from my part as much as I can, even though I've never messed with scripting before (only made custom units).

    I'm throwing here some requests from people who've enjoyed your mod. I don't know if you have time to check them out or even if they can be implemented at all:

    - When there are at least 3 of my armies fighting in a battle, the third army isn't managed by the AI.

    -Is there any way this could be tweaked to make it so the AI takes over reinforcements. I've actually been looking for a mod that allows the AI to take over my reinforcements as I suck at managing that many units at a time.

    -what about a toggle on/off button for specific groups of units to be ai controlled -ie group units, and assign them to ai

    -Would it be possible to have the player controlling the lord only?

    Cheers!
  • HambangoHambango Junior Member Posts: 60Registered Users
    edited March 3
    Ok, I put in a few hours last night, and after 8 mugs of black coffee, a mild headache and some disdainful looks from the wife here's a status report: ;)

    First of all some explanation:

    This mod basically exploits the script based battle system which is normally used to script quest battles, intro battles, etc. The tools provided by this system are extremely limited.
    The perfect example of this is the limitation to the Esc key. There doesn't seem to be any other possibility of input.
    There's also next to no feedback from the system and not alot of documentation from CA, which makes debugging a massive headache.
    That said, I'm determined to improve this mod as best as I can and try to implement as many features as possible.

    I'll go now through some items on everybody's wishlist and discuss their feasibility:

    - The bug with the third army and the summons: This one's at the top of my list. Still working on it. I'm not sure why it's not working with my current version, it should by the looks of it. Maybe I'm overlooking something or some inner machinations prevent it from working. The system was never really meant to give ai control to the player's armies in the first place. But I'm hopeful I'll find a solution.

    - Giving ai control only to the reinforcements: If I fix the first item, this should be perfectly doable.

    - Giving ai control to selected units: I don't think so. There doesn't seem to be a way to get any input from the UI, so it's pretty much impossible to select individual units and send the needed information to my script. Also as mentioned before we're limited to the Esc key only, which would make this very hard to implement.

    - Letting the player control the lord only: Should be possible. I'll look into it somewhere down the line.

    - On/Off toggle: Perfectly doable. The reason I haven't released it yet is that I want to solve the reinforcement problem first. It could be that I'll have to change my current version quite drastically once a solution is found. The only downside to this is that the Esc key wouldn't work to open the game menu for the duration of the entire battle.

    That's it for now :smiley:
    I'll try to do some work on the mod in the evening and over the weekend.
    Very nice idea with the DLC giveaway btw, John! Thanks alot! I can see the mod's in good hands. ;)

    Cheers!
  • PhilipFPhilipF Junior Member Posts: 17Registered Users
    edited March 3
    I'm really enjoying this mod! Thank you! :)

    As a dyspraxic with terrible coordination, Total War battles have always been more about watching with AI control turned on rather than micromanaging and, as such, without any AI control option at all, I was finding even simple battles in Warhammer extremely difficult and not much fun...

    Is it possible to make the same effect work for Quest Battles?...For the likes of me, they're virtually impossible without it...;)
  • john_vindleyjohn_vindley Posts: 19Registered Users
    edited March 3
    @Hambango Wow, I'm out of words. You actually took the time to check out the requests and improve the mod. You are great! The community already loves you by now as the mod is going very well :blush:

    And I understand your wife... My girlfriend reacts the same way (and even worse) when I'm spending hours over the PFM he he.

    I believe the number one request is giving the reinforcements to the AI (or have the AI take control of the first army and the player take the reinforcements).

    If you fix this, you'll make the players (and me) very happy, but even if you don't, know that this is still one of the best mods that have come out.

    And thanks for your kind words. As for the giveaway, I just started it for fun :smiley:
  • HambangoHambango Junior Member Posts: 60Registered Users
    edited March 5
    If all goes well there should be an update this evening.
    So stay tuned! :smiley:


    @PhilipF
    I'm very sorry to hear of your condition.
    It's good to hear that my mod improves your gaming experience, though!
    Sadly implementing it for all quest battles would mean to edit every single corresponding battle script, and there are dozens.
    It's taken me quite some time to do it for two (campaign battles and custom battles).
    Sadly, I don't think I'll have the time for such a large project.
    Also it would be very hard to implement it so that it wouldn't interfere with ingame cutscenes.
    I'm very sorry.
  • HambangoHambango Junior Member Posts: 60Registered Users
    Ok this forum seems to have bugged out on me..
    I posted the new version and the changelog and after a quick edit the post is gone.
    Oh well, let's go again...
  • HambangoHambango Junior Member Posts: 60Registered Users
    Alright, new version incoming! :D


    http://www.mediafire.com/file/g9s6zyjnjrsszr0/spectator_mode.pack


    Here's the changelog:


    --------------------------------------------------------------------------------------------------
    Changelog v 1.1

    FIXED:
    - All reinforcements should now be under AI control if active.
    - All summoned creatures should now be under AI control if active.

    NEW STUFF:

    - Mode change is now also possible during battles by pressing the ESC key.
    - New lord mode
    - New reinforcement mode
    - Mode changes are now indicated by advisor pop-ups.

    KNOWN ISSUES:
    - The mod doesn't work when your army is the reinforcing army. Better keep your fingers off the ESC key in this case. I'm still looking for a workaround for this issue. I'm not certain there exists one...
    - The Esc key can't be used to access the in-game menu anymore, you'll have to use the icon in the upper left corner of the screen. I'm still searching for ways to use another key or, even better, several. Haven't found one yet.
    - The AI is being stupid from time to time. Not much I can do about that...

    A unit, which has been controlled by the AI, but isn't anymore will still carry out its last orders. It will look like it's still being controlled, but it isn't. You'll be able to give it orders, which won't be overwritten. That's working as intended.

    UNKNOWN ISSUES:
    -Probably a ton.
    This whole thing is highly experimental and I've had to get pretty creative for some of it.
    I haven't really had enough time to thoroughly test it all out.
    So prepare for bugs!

    Have fun and thanks for all the kind words!

    -----------------------------------------------------------------------------------------------------------


    @John:

    You might want to provide a link to the old version or this thread in case someone wants to roll back.
    Again, thanks for publishing!

    Cheers!
  • Alaric83Alaric83 Posts: 72Registered Users
    Once again first to comment hahah

    And once again, thank you sooo much for your tremendeous work. I, and several other across multiple forums, had been looking for a loooong time for a mod such as yours. Now, with Lord Mode and Reinforcement Mode, it is simply perfect.

    Just to be sure => Using the ESC key during combat, it allows us to switch dynamically between the modes ? Or should we choose our "mode" during the deployment phase, still ?

    Or can we switch still during the battle ? For exemple, beginning in Full Spectator mode, then switching to Lord Mode a bit latter ? Or vice-versa ?

    Once again, thank you SO MUCH for this mod. This is the end of the auto-resolve fest for me. Probably gonna buy a new graphic card. I now want to improve graphics, provoke massive battles and enjoy the scenery without the UI hahah.
  • HambangoHambango Junior Member Posts: 60Registered Users
    @Alaric83

    Thanks for the kind words, means a lot! :)
    And you're very welcome! I've been looking for something like this in a TW game for ages, too. I'm still a little shocked this thing actually works! :D
    I'm hoping that if this mod gets enough attention and subscribers on Steam, CA might decide to put it into the game themselves. For them it would be far easier to do and the final result wouldn't be as crude.
    As to your question: You can now freely switch between modes whenever you want during the battle.
    Just don't go too crazy on the Esc key, I have no clue what it does to the AI when it gets reset every 3 seconds. You wouldn't want to give the little guy an aneurysm! >:)

    Have a good one!
  • john_vindleyjohn_vindley Posts: 19Registered Users
    edited March 6
    @Hambango Hi, I was away this weekend and just tried your update. Amazing work!! Really love the new UI with the advisor. You sir are a professional, you need to get a job at CA asap (unless you're getting good money where you are and I hope you do)!

    The only downside I see is that Escape is not working for bringing up the menu anymore, but I understand there isn't a better workaround for this.

    Also, in one battle I chose Lord mode and Grombrindal kept charging at enemies without listening to my commands (stubborn, hotheaded dwarf...), but in all my other tests with various Lords it worked as intended.

    If I find any other bugs, I will report them here.
    Post edited by john_vindley on
  • HambangoHambango Junior Member Posts: 60Registered Users
    Hi John,
    glad you like the update. :)
    But you do me too much honour. I'm no professional programmer and I'm sure any professional could tell by my coding style. Also, I've already got another job :D

    I'm sure there are still a lot of kinks to be ironed out. I definitely haven't considered all situations that could arise in-game. Your bug with a lord not following orders I couldn't replicate yet. Was it a custom battle or in the campaign?

    I'll try to squash the bugs once they are found by the community. In the meantime I'll try to find some solution for the existing restrictions. I'm also hoping that some other folks with more programming experience take a look at the mod and maybe come up with ways I haven't thought of yet, who knows.

    Thank you for the update on Steam!

    Cheers!
  • Alaric83Alaric83 Posts: 72Registered Users
    Hey man! Having a great time with your mod. Literally a game-change.

    I found a bug though. Not a very nasty one, but still.

    When the mod is up, I can't change the resolution of the game. It makes it freeze and I have no choice but to force it to close.

    That's it. Like I told you, it doesn't prevent me from playing, as I just have to adjust the resolution beforehand. Weird bug :-)
  • HambangoHambango Junior Member Posts: 60Registered Users
    Hi guys,

    I figured out how to select individual units and send them under AI control :)


    This means the new version 1.2 has again seen a radical redesign...



    CHANGELOG v 1.2


    ----------------------------------------------------------------------

    NEW STUFF:
    - It's now possible to send individual units under AI control.
    Just select the units you want to be controlled by the AI and press ESC. The next time you press ESC the units that aren't selected will have their AI deactivated.
    -Lord and Reinforcement Mode have been removed since they are obsolete now.

    --------------------------------------------------------------------------

    Some people had problems getting out of camera mode due to the ESC key not working anymore. Pressing the DEL key will do the trick in this case. :D

    @Alaric83:
    I'm glad you're still enjoying the mod! That's indeed a strange bug. I couldn't replicate it on my machine. You shure there isn't another mod responsible? Our mod doesnt touch any files related to video settings.
    Anyhow, thanks for reporting it!

    Ok, that's it folks.
    My brain is mush now... I'm going to bed.

  • HambangoHambango Junior Member Posts: 60Registered Users
    edited March 8
    Edit:
    Hi,
    no work today (yay :) ) and the wife's not at home (uhm...yay? :wink: ), so I've got a bit of time.
    I took the link down. This version didn't work properly. Must have been fatigue...
    I'll look into it.
    Post edited by Hambango on
  • HambangoHambango Junior Member Posts: 60Registered Users
    edited March 8
    Ok, should work now.
    That'll teach me not to do this stuff late at night. :*

    http://www.mediafire.com/file/2dtiia0ys87h9q8/spectator_mode_1_2_1.zip

    John,

    maybe you should think about changing the name of the mod slightly.
    Someone on Steam mentioned it being more than the name implied, and I guess he's right. It has grown to more than just a spectator mode. Maybe "Spectator Mode and AI Control"... I'm not very creative in such things :D
    Anyway, it's your call to make, just a thought.
    Post edited by Hambango on
  • RifugioRifugio Member Posts: 593Registered Users
    Hambango said:

    Hi guys,

    I figured out how to select individual units and send them under AI control :)


    This means the new version 1.2 has again seen a radical redesign...



    CHANGELOG v 1.2


    ----------------------------------------------------------------------

    NEW STUFF:
    - It's now possible to send individual units under AI control.
    Just select the units you want to be controlled by the AI and press ESC. The next time you press ESC the units that aren't selected will have their AI deactivated.
    -Lord and Reinforcement Mode have been removed since they are obsolete now.

    --------------------------------------------------------------------------

    Some people had problems getting out of camera mode due to the ESC key not working anymore. Pressing the DEL key will do the trick in this case. :D

    @Alaric83:
    I'm glad you're still enjoying the mod! That's indeed a strange bug. I couldn't replicate it on my machine. You shure there isn't another mod responsible? Our mod doesnt touch any files related to video settings.
    Anyhow, thanks for reporting it!

    Ok, that's it folks.
    My brain is mush now... I'm going to bed.

    Great work @Hambango!
  • HambangoHambango Junior Member Posts: 60Registered Users
    Another tiny update:

    http://www.mediafire.com/file/v6uqq82wuvzy3k8/spectator_mode_1_2_2.zip

    The AI should now be a little bit better at chasing down the enemy when the battle's won.

    @Rifugio: Thanks! :)
  • john_vindleyjohn_vindley Posts: 19Registered Users
    @Hambango I really appreciate your efforts to improve this awesome mod! I'm just a bit sceptical with your last update and I'm still contemplating if I should upload it.

    The first reason is that I really liked in 1.1 that we had the ability at any point during the battle to turn off the AI and return to manual control. This allowed the player to take charge if things went awry. Is there a way to insert this back?

    The second reason is that giving certain units to AI can get a bit complicated as there is no way to know what units are AI controlled and what are manual (something like different colors on the cards or just a highlight would really help). In the heat of the battle this can prove quite disorientating as you desperately try to separate the units and try to remember what you chose to give to the AI.

    I don't mean to question you in any way. I'm just providing feedback as I want this mod to be the best it can be. I wish I could help with scripting, but my knowledge is very limited. Hopefully, someone may come along by seeing the steam page or this thread.
  • HambangoHambango Junior Member Posts: 60Registered Users
    Hi John,

    Thanks for your input.
    Sadly I'll have to be brief, I don't have much time at the moment.
    Of course it's up to you if you want to upload it or not.
    Personally I like the new version better. Once you've familiarized yourself with it it's actually quite simple.
    Basically the AI controls all units, that are selected when you're pressing ESC. Deactivating the AI is done by pressing Esc while no units are selected. The Tooltip says 'AI control off' at this point. Spectator mode is achieved by pressing Esc while all units are selected. This variant gives far more control to the player over which units he wants to control himself. Sadly it isn't possible to give any graphical hints to which units are ai controlled. An easy fix would be to form unit groupings via Cntrl + number key in the game and give ai control to some and player control to others.

    An added bonus of this version is that it solves some internal issues that where pretty much unsolvable with the old version.
    But as I said, it's of course your decision.

    Gotta go!
    Have a good night!
«13