Repair laser = Aggressive action? Mod (maybe) to fix this?
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
-
- Posts: 138
- Joined: Sat, 14. Apr 12, 18:25
Repair laser = Aggressive action? Mod (maybe) to fix this?
So, I posted this over in the X-Universe section, and apparently it didn't belong there--so I'm trying again here:
In some weird twist of fate, using the repair laser on allied (but not owned) ships will piss them off. Found this out the hard way, doing an escort mission for several freighters ([OT] is there a way to get multi-freighter escorts to fly in formation? they pop around all over the sector and it's really a pain to keep track of [/OT]) and it was worth 50,000, so I really wanted to keep everybody alive.
Anyway, one of the freighters got heavily damaged, and I didn't want to lose the mission...he was going slow enough though that I could strafe next to him in my space suit--so I figured I'd fire up my repair laser and fix him up. He started complaining. Not wanting to lose the mission because I pissed off my customer, I bailed and hot-footed it back to my ship.
You can guess what happened next. He got blasted and I lost the mission anyway. Help?
In some weird twist of fate, using the repair laser on allied (but not owned) ships will piss them off. Found this out the hard way, doing an escort mission for several freighters ([OT] is there a way to get multi-freighter escorts to fly in formation? they pop around all over the sector and it's really a pain to keep track of [/OT]) and it was worth 50,000, so I really wanted to keep everybody alive.
Anyway, one of the freighters got heavily damaged, and I didn't want to lose the mission...he was going slow enough though that I could strafe next to him in my space suit--so I figured I'd fire up my repair laser and fix him up. He started complaining. Not wanting to lose the mission because I pissed off my customer, I bailed and hot-footed it back to my ship.
You can guess what happened next. He got blasted and I lost the mission anyway. Help?
Argon Explorer
- Sam L.R. Griffiths
- Posts: 10522
- Joined: Fri, 12. Mar 04, 19:47
It may be possible to implement a repair target ship script as an alternative.
Lenna (aka [SRK] The_Rabbit)
"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55
"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb
"When eating an elephant take one bite at a time" - Creighton Abrams
"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55
"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb
"When eating an elephant take one bite at a time" - Creighton Abrams
-
- Posts: 19
- Joined: Sat, 28. Jun 08, 14:45
It should be noted that with this sort of modification you will perhaps never again be able to capture an ARAN, as the normal method applied uses an repair laser to make the ship hostile
EDIT : On second thought it should work with low damage lasers as well, but with the normally low hull it will more often end catastrophic
EDIT : On second thought it should work with low damage lasers as well, but with the normally low hull it will more often end catastrophic
Why? - Modifying the repair laser would be pointless as nothing you do would ever get the game to stop registering it as a hostile action. Therefor making a script to use instead is the only option. There is no way to tie the script to the repair laser it will have to be a hotkey.GeneralMagnum wrote:It should be noted that with this sort of modification you will perhaps never again be able to capture an ARAN, as the normal method applied uses an repair laser to make the ship hostile
EDIT : On second thought it should work with low damage lasers as well, but with the normally low hull it will more often end catastrophic
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
Read the thread from the top perhaps? "10 lines of code", In the C++ Engine.Blaank wrote:Wouldn't it be a simple change in the agro proc? Have it check if the attack is giving positive or negative damage and then aggro only if taking positive damage. That's, what, 10 lines of code?
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
- DrBullwinkle
- Posts: 5715
- Joined: Sat, 17. Dec 11, 01:44
Re: Repair laser = Aggressive action? Mod (maybe) to fix this?
As already discussed by two of the most knowledgeable people here, you will probably not get a change to the way that the repair laser in your space suit works.Jaycen_Aelis wrote:Help?
However, it is entirely possible that you could get a script that helps to address the issue of damaged ships during escort missions. In order for that to happen, you would have to come up with a plausible "reason" to repair a non-player-owned ship. Also some balancing "cost"... so that the player does not run around patching up everybody's ships all of the time.
Sometimes you need a good story to inspire the script developers. Something with broader appeal than "I needed it on one mission".
The vanilla answer, of course, is "avoid allowing your escorted ships to be damaged". I know... it is easier said than done.
In the meantime, in answer to your off-topic question, Gazz wrote Convoy Control to help address the issue of your convoy stretching out over dozens of kilometers. Convoy Control slows all of the ships in the NPC convoy to match the speed of your slowest ship. It may not entirely solve your "formation" problem, but it should help.
Tip: If you have enough ships, then you can assign one (or more) to "Attack target nearest" each ship in the convoy. That helps quite a bit with defending your convoy. (Give each of your escorting ships a few fighter drones -- they can be good "interceptors" in a tight situation. You will have to command the drones manually, of course.)
Peace through superior firepower
Bullwinkle's List | Marine Repairs and Training | Mobile Mining Mk2 | Drone Carrier Software 2 (DCS2) | Ship Tricks: Mini-Guides (with Video)
Bullwinkle's List | Marine Repairs and Training | Mobile Mining Mk2 | Drone Carrier Software 2 (DCS2) | Ship Tricks: Mini-Guides (with Video)
As has been said before the game is written in C++. Which means it is compiled and not interpreted like JavaScript, PHP, Ruby(Normal kind).
So we end up with complied files and not the actually code. Which means you would need a decompiler or a disassembler (and knowledge of assembly language) in order to even start the process of modifying the game. (I didn't even know there was a difference between a decompiler and a disassembler till today. Learn something new everyday!)
I remember someone figured out how to do some type of injection into the game by identifying what amounts to a ruby 'eval' or 'send' statement some where in the code. And no it wasn't a FXAA 'injection'. Though it didn't exactly make things all that much easier from what I remember. Now where did I read that, or maybe they where saying injection but didn't mean it .... hmmm Anyway it would be a really big pain in the but when a script could do the same thing 10X easier.
It also might be hard because the repair laser its self isn't hard coded but is rather declared is TLasers, so you might have to do something hacky, or risk the 'mod' not working with other mods.
So we end up with complied files and not the actually code. Which means you would need a decompiler or a disassembler (and knowledge of assembly language) in order to even start the process of modifying the game. (I didn't even know there was a difference between a decompiler and a disassembler till today. Learn something new everyday!)
I remember someone figured out how to do some type of injection into the game by identifying what amounts to a ruby 'eval' or 'send' statement some where in the code. And no it wasn't a FXAA 'injection'. Though it didn't exactly make things all that much easier from what I remember. Now where did I read that, or maybe they where saying injection but didn't mean it .... hmmm Anyway it would be a really big pain in the but when a script could do the same thing 10X easier.
It also might be hard because the repair laser its self isn't hard coded but is rather declared is TLasers, so you might have to do something hacky, or risk the 'mod' not working with other mods.
Last edited by RoverTX on Sat, 26. Jan 13, 07:21, edited 2 times in total.
http://en.wikipedia.org/wiki/Interpreted_language
http://en.wikipedia.org/wiki/Compiled_language
The mods you see out there are mods of files that are not complied. Ie resource files, scripts, models, directors, textures etc etc. What your looking to do is 'hardcoded' which means it complied and not realistically moddable with out an stupid amount of work and/or software/resources/knowledge.
I am over simplifying somewhere but what ever.
http://en.wikipedia.org/wiki/Compiled_language
The mods you see out there are mods of files that are not complied. Ie resource files, scripts, models, directors, textures etc etc. What your looking to do is 'hardcoded' which means it complied and not realistically moddable with out an stupid amount of work and/or software/resources/knowledge.
I am over simplifying somewhere but what ever.
There is no such thing as a variable "proc" as far as X3 is concerned.Blaank wrote:Are you saying people can't make a mod that checks if a number is negative and ends the proc instead of continuing with the hostility?
There's only one proc for lasers, and that's hostility. The game engine isn't designed to do anything else when a laser hits a target.
As stated above, it isn't some easily found, easily modified value that you can switch on and off.
Admitting you have a problem is the first step in figuring out how to make it worse.
The X Engine is made up of 3 layers.Blaank wrote:I didn't know modding was that limited. I've only worked with source code before and this would be a super-easy fix. I don't have words that can express any further.
You have the C++ Engine
the KC Engine
and finally the SE/MD Engine(s).
The C++ Engine is responsible for loading the game data assets, as well as everything that happens in sector (firing weapons, hit detection, hit processing, etc)
the KC engine is responsible for everything that happens in the entire galaxy, it has direct but limited control over the C++ engine and is not capable of intercepting any damage "proc" from the in sector engine. It does however process all out of sector simulation.
The SE/MD engines are built within the KC engine, which give direct control over the galaxy engine, but no direct control over the sector engine. Again, you can effect the sector engine with its commands but you cant directly change its behavior on any fundamental level.
In order to make the change your describing, it would take an in memory patch of the C++ engine, which is something that is extremely hard to do - and something i have attempted myself (and failed, miserably ) ... The biggest problem is identifying the code you need to change. Unlike C, Compiled C++ Code is completely obfuscated, there are no readable function names, and infact the only thing that you can read would be static strings. This makes reverse engineering to find a jump patch point extremely difficult.
TL;DR: Its never going to happen unless egosoft themselves make it happen, as its been said by almost everyone in the thread, a script is the only option.
Last edited by Jack08 on Sat, 26. Jan 13, 07:45, edited 1 time in total.
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
- jack775544
- Posts: 1277
- Joined: Tue, 13. Dec 11, 08:27
Yes for that type of editing you would need to edit the KC code (the games C++ engine code). This is possible as mods such as Time of the Truth and the upcoming X-Timelines has shown (the KC edits X-Timelines were done by Jack08 who replied to this thread before). However you have to disassemble it which makes Assembly Code. So if you wish to edit the assembly code you can.
EDIT: Ninja'd by Jack08
EDIT: Ninja'd by Jack08
1940s - Various "computers" are "programmed" using direct wiring and switches. Engineers do this in order to avoid the tabs vs spaces debate.
- DrBullwinkle
- Posts: 5715
- Joined: Sat, 17. Dec 11, 01:44
That's easy. First of all, Marine Repairs does it.Blaank wrote:Would it be at all possible to make a script that will change the current HP of a specified ship?
Second, see my post, above. Give us a reason to do it.
Peace through superior firepower
Bullwinkle's List | Marine Repairs and Training | Mobile Mining Mk2 | Drone Carrier Software 2 (DCS2) | Ship Tricks: Mini-Guides (with Video)
Bullwinkle's List | Marine Repairs and Training | Mobile Mining Mk2 | Drone Carrier Software 2 (DCS2) | Ship Tricks: Mini-Guides (with Video)
...Blaank wrote:Would it be at all possible to make a script that will change the current HP of a specified ship?
Yes.
(im sure we've said that a script can be used this way, plenty of times - )
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
Ok, so create a new gun used by the space suit and activated by a different key than the real repair laser so the real one doesn't fire. It has the same graphics but instead of dealing damage to the target it edits their HP.
I'm thinking you could come up with a way to check the range and line of fire and see if it collides with a ship, then ask the game what ship is that, then modify the hp of that ship.
I'm thinking you could come up with a way to check the range and line of fire and see if it collides with a ship, then ask the game what ship is that, then modify the hp of that ship.