Help understanding some code

  • i think u want too much from this game lol (without sorce code <img src=smilies/icon_smile_sad.gif width=15 height=15 border=0 align=middle> ) if u make lost of changes it might coz problems in the cinima part of the SP and might coz that u wont be able to finish the SP (stuk with king for all times <img src=smilies/icon_smile_wink.gif width=15 height=15 border=0 align=middle> )

    ShadowKnight , When The Darkness Take You Over , Join The Shadow Knight`s , Kill You`r Enemy`s With No Mercy , And Become A Shadow You`r Self , THERE IS NO ESCAP FROM THE SHADOW`S !!!

  • No, what he´s talking about <i>is possible </i>... but... not very easy. Basically, all SP is ... is a series of scripts that run in a linear fashion. It´s quite possible to write an entirely new SP campaign. But. If you´re going to seriously attempt to hack SP... good luck. I took one look and was like, &quot;no way&quot;... The only person on TLR who has done a significant amount of SP hacking (that I know of) is Slivik, author of Tie Universe 2.1. He had to alter cutscenes, etc. to fix things in his mod. I doubt that he´s going to be willing to help you hack SP, but if you´re looking for a place to get your questions answered... he may be able to help, if you ask very nicely.

  • I didnt realize this to be a &quot;Hacking&quot; Issue. However I do imagine you lot have so much more knowledge about it than I do. I was under the impression that this file - m01a.ini explains when: King Spawns and follows trent, it tells us how this whole process is triggered. It also tells us when the order ships spawn and at what location and how many of them there is. It tells us in what way they should fight. It also tells us when the station sends alert fighters along with how many waves (as I mentioned before, I was able to adjust the ammount of waves with relative ease) It tells us to whom the alert fighters should be allied with and against. It tells us when they should return and dock at base. The file basically tells us everything. What im looking for is 99.9% of the code removed then restructered in such a fashion whereby the only thing that occurs is King spawns and King forms up (When you leave Manhatten) But then maybe theres so much more to it than I realize, If its not possible, I would love to hear exactly why, since its all very interesting to me. Thanks guys

  • I mean &quot;hacking&quot; only in the old-skool sense- this goes considerably beyond the average modder´s skills- it´s a coding problem. The big problems I see with what you´re proposing to do is: 1. If you just want SP to end right there... just go download the OpenSP mods. They start you in SP in various locations, with various amounts of money... and you don´t have to sit through any cutscenes. So... if that´s all your wanting... great, the problem´s already been solved. 2. If you´re wanting King to form up with you and then ... have something else happen... then you´re going to need to look at the way Mission Start and Mission End states are set, and go from there. As I said before... I took a look at this, and ran away screaming, and I´ve done a fair amount of modding at this point <img src=smilies/icon_smile.gif width=15 height=15 border=0 align=middle> So basically... if you just want to skip SP, it´s been done (in some cases, quite elegantly)... if you want to build a new SP... it hasn´t been done, period, so you´re in uncharted waters. Edited by - Argh on 12/1/2004 1:25:13 PM

  • Ok, well the only logical way I can see this being achieved (from my end) is taking the original file - m01a and stripping it piece by piece untill I have the absolute basics of what causes king to spawn and king to follow. I am assuming before I start this that I might need to re-shuffle some code and thats going to be a nightmare. If however i do manage to get this done, then I would like to know how to trigger the same situation in different ways. In this case I want it to trigger automatically upon launch. I want to know if the same deal can be achieved when for example, the player reaches a location, or retrieves an object, or, you know, whatever... Thanks

  • Anything you learn about this... I think we´ll all be very interested in knowing. As I said before, the only person that I know has worked with this stuff to any serious degree has been Slivik, so give it a whirl... who knows, maybe you´ll get this sorted out, and we´ll be on the road to having custom SP campaigns. BTW, if the game crashes, you can see the states that triggered the crash state (most of the time) by viewing the flspew.txt file that´s created at the time of the crash- it´s quite handy for debugging <img src=smilies/icon_smile.gif width=15 height=15 border=0 align=middle>

  • I´ve been messing around with single player recently, and i thought i´d give this a go. So far, I´ve got it so that you can launch and king will join formation and follow you everywhere, and if you dock he´ll wait outside, and rejoin formation when you launch. You can also do missions with him, and he´ll break formation and fight the enemies, I´ve set it so he´ll break formation when you´re shot at, and rejoin formation after 20 seconds. If you get hit again, he´ll break formation again etc. It works with random encounters too, but he won´t attack anyone who isn´t enemies with the LSF, even if you do. I can e-mail what I´ve done so far to you if you want to play with the code.

  • Sweet! Glad to hear that more than just a few people are hacking at this problem <img src=smilies/icon_smile.gif width=15 height=15 border=0 align=middle> Thanks for sharing, Marauder <img src=smilies/icon_smile.gif width=15 height=15 border=0 align=middle>

  • Ok, it´s sent. I´m glad you came up with that idea, I didn´t think about trying something like this before, and it works pretty well. Something that I think would be very difficult to solve (if possible at all) would be to upgrade his ship as you upgrade yours, at the moment he´s permanently stuck in a starflier with 2 justice mk 1´s. Could maybe get round this by starting with very heavy fighters. Also, I don´t think he comes back if he gets killed (which is how it should be!), but it would mean restarting the game all over again if he dies. If anybody else wants to try it, you can download it here: http://www.freewebs.com/marauderfl/king%20escort.zip Edited by - Marauder on 12/1/2004 2:14:48 PM

  • In the original game, he´s made more-or-less invulnerable, and Juni even moreso. They even have a custom Loadout for the moments when it´d be... a real bummer if they died. You can definately switch their Loadouts via Mission scripting. I don´t know *how*, mind you... but it gets done in various places- if you look at the loadouts.ini you´ll see different references to King and Juni (among others) specifying their Loadout during a Mission script. So it´s definately there for you to play with, although it´d involve making a lot of custom loadouts, and it wouldn´t work in anything but SP <img src=smilies/icon_smile.gif width=15 height=15 border=0 align=middle>

  • Switching loadouts in the middle i think would mean having to have a sort of campaign, where you complete a mission and then on the next mission king/juni or whoever will spawn with a different loadout. With this there´s no campaign, just flying round as you normally would, but now with King in tow.

  • I can confirm that marauders code works brilliantly and its really very simple to alter what type of escort you wish to have, I for example have a standard liberty defender following me around right now. Dispite this I am still unable to determine the correct format for which to code multiple escorts. ------------------------------- As I am sure you are all aware, in certain missions, you are required to tractor beam a particular item (usually a pod) and this triggers Mission Success. The Million Dollar question is: Can you create a new commodity (lets call it escort fighter). Then using the same idea that the mission success trigger has: which in plain english would be something like: if item in cargo = true then mission complete = true if item in cargo = false then mission complete = false Can we have it like this: If item in cargo = true then spawn escort = true if item in cargo = false then spawn escort = false. Well now, that is something to ponder over, but you really never know. If you could get the code that manages those missions then im sure this can be achieved and ultimatly present for me as one, the most desirable mod for this game. Thats alot to ask, obviously! but its only logical to assume that by combining marauders example code with the coding used in such missions must surely be the way forward to achieve such things.

  • Yes, I´m pretty sure this is possible, and not too hard to do, I´ll have a go at it later. Also, I´m going to try to get Juni following you round as well, and make her and King break formation when you attack someone, instead of when someone else attacks you (so if you want to run instead of fight they will stay with you). I´ll also unlock all the jump gates, which I forgot to do before, and I´m going to have a go at doing something where King and Juni will upgrade their weps, maybe if you land at a certain base or something. Actually, after re-reading your message, I´m not really sure what you want. I could quite easily make a certain commodity appear when you leave a certain base, and then spawn an escort if you beam it in. This could maybe be used to spawn a specific escort when you beam a commodity in from, for example, outside Manhatten, so basically you could pick an escort. However, the commodities would disappear if you go too far from them, but I could maybe make it so they reappear every time you leave manhatten. Edited by - Marauder on 12/2/2004 3:21:27 AM

  • Thats great, im glad some people are thinking logically, as before - some people would automatically assume NO! CANT! WONT! SHANT! NEVER! IMPOSSIBLE! I think its all very possible indeed, it just depends completly upon how the problem is looked upon. Moaning Over If we can establish a method to have more than 1 escort following you around then that is excellent progress, I tried it last night but never got it (will continue on it when i get home). If and probably when this is achieved, it would be important to look at different ways to trigger these events. As mention before - if we look at this in a fashion such as: If Commodity in Cargo = True then Spawn Escort = True When that is achieved then I believe it to be the foundation of many other possibilities. Everyone has dreamed (im sure) of being able to build a personal station, in real-time in the game. Using the same methods as we are trying as of now, this could also be achievable. This is bound to be attracting interest by now, if other people work on this, then you have true progress, not a half baked potatoe but something that is solid and capable

  • What I mean by the commodity is this: Put a new commodity into a list of commodities currently available at a certain planet or spacestation, call it Escort Pilot When you launch to space figure the code out so that if the commodity in the cargo = true, then spawn the escort. If on the other-hand you dont have the commodity in the cargo then escort spawn = false Hope that helps

  • See now there´s a point too. If you can achieve a more in depth degree of open endedness by hiring escorts, then you could take it up another notch, another step and create a freelancer bar- sometyhing I´ve never come across whereby instead of the ship dealer menu, you have a sword icon signifying &quot;Mercenaries/Escorts.&quot; If that could be created, then this could create an interface whwereby you could buy an escort (who would technically for code purposes be a commodity if it´ll work) and basically make the game world just that little bit better. I love the idea of having escorts helping you out, especially if you play as a freighter transfering cargo about, or even just if you´re a newbie that needs a hand finding his/her feet against would-be PVPers. Certainly the code is in there for it, just check the mission .INI files and I´m sure you can find a lot of the scripts and triggers for this kind of thing. Thinking about it logically, it would be possible I think to create a group called &quot;Escort&quot; and an alignment of &quot;Neutral&quot; which would allow the purchased merc to attack anything that opens fire on you specifically. Also, maybe then in later updates or versions then you could have specific types of mercenary, for example Bounty Hunters, or Corsairs as sellswords, each with their own agenda and fighting style. Sure, there´s bound to be teething problems, but it looks plausable and seems straightforward enough, especially if a coder is willing to try. Using King or Juni as an example would work well given that their code is the most frequent in the game source in terms of triggers and scripts pertaining to following a character. If people could work from that source, I´d say there´s a great opportunity to perfect the two escort formation and make the game that much more rewarding. I also really like the idea of purchasing or buying your own space station- your own wee plot of space within which you could upgrade it, hire people to guard you and basically have a base of operations. I know this seems far fetched, but the key here I feel is immersion, this game shouldn´t be just about blowing up your fellow man, but about Roleplaying and being rewarded for the long hours of play with more than a new pair of blasters and maybe a few salvaged commodities. (Not saying I dislike the game as is, I´m just saying that this game has the potential to be even more great than it is now!) Edited by - Muramasa-Edge on 12/2/2004 4:02:42 AM

  • I´ve now got Juni escorting you as well as King, and I´ve made them virtually indestructable by giving them a ridiculous amount of hull strength. I´m going to make it so that every so often, every 5 or 10 minutes or so, they regenerate back to full health. So basically they´ll never die. I´ve still got problems with the formations, I want them to drop out of formation only when you attack an enemy, and not the other way around, but I can´t get this to work. I had a quick go at the commodity idea, buying escorts, but it didn´t work. I´m almost completely sure that it´s possible, though, so I´ll have another try later.

  • Well in terms of a specific story line then perhaps you wouldnt wish your escort pilots to break form as this might slow the storyline down at certain stages. On the otherhand, if you arnt following the story line and lets say that we do get the commodity thing working, they should break form when danger has been detected. I simply cannot wait to see if the commodity feature works out, that will be simply unbelievable and would make non-believers really believe as well for that matter <img src=smilies/icon_smile.gif width=15 height=15 border=0 align=middle>

  • If you´re making a specific storyline you would tell the escort(s) to break formation when you get within a certain distance to the waypoint, at this point you´d also make your enemies spawn. Obviously, you can´t do this with random encounters, because the enemies could turn up anywhere, at any time. Actually, I think random encounters are turned off (there´s a bit of code for it) in all the story missions, and all the npcs that you see are being told what to do in the ini file for that mission.