How to alter code in a Portal 2 mod?
Quote from Doomaflatchi on July 17, 2014, 2:52 pmI'm having trouble getting started on my project. I've created a Portal 2 mod by following the tutorial found here, and now I need to make a few alterations to the code in Visual Studio 2010. However, I'm having difficulty getting the files in the right place.
I've downloaded the Soruce SDK 2013 from GitHub and built the everything.sln and games.sln solutions out of it, which I can open in VS, but I don't know how to put the file structure together so that the code files I alter will work in my specific mod. Can anyone give me some help here? Or a basic walkthrough on how to get custom code into a Portal 2 mod?
I'm having trouble getting started on my project. I've created a Portal 2 mod by following the tutorial found here, and now I need to make a few alterations to the code in Visual Studio 2010. However, I'm having difficulty getting the files in the right place.
I've downloaded the Soruce SDK 2013 from GitHub and built the everything.sln and games.sln solutions out of it, which I can open in VS, but I don't know how to put the file structure together so that the code files I alter will work in my specific mod. Can anyone give me some help here? Or a basic walkthrough on how to get custom code into a Portal 2 mod?
Quote from Doomaflatchi on July 17, 2014, 7:50 pmDoes the src folder from SDK 2013 just go straight into my mod folder?
Does the src folder from SDK 2013 just go straight into my mod folder?
Quote from TeamSpen210 on July 17, 2014, 8:53 pmYou can't/shouldn't be able to edit Portal 2's code - it's closed source. (SDK 2013 doesn't include the code for portals, probably so Valve can keep that to themselves for future games.)
You can't/shouldn't be able to edit Portal 2's code - it's closed source. (SDK 2013 doesn't include the code for portals, probably so Valve can keep that to themselves for future games.)
[spoiler]- BEE2 Addons | (BEE2)
- Hammer Addons
Maps:
- Crushed Gel
- Gel is Not Always Helpful[/spoiler]
Quote from Doomaflatchi on July 17, 2014, 9:04 pmSo, just to be clear, is it completely impossible to use a linked_portal_door entity (a Portal 2 entity) in the same map as any modified code or custom entities? (I don't even need to change any Portal 2 entities - just the player, and create some new ones from scratch)
So, just to be clear, is it completely impossible to use a linked_portal_door entity (a Portal 2 entity) in the same map as any modified code or custom entities? (I don't even need to change any Portal 2 entities - just the player, and create some new ones from scratch)
Quote from FelixGriffin on July 17, 2014, 10:16 pmDoomaflatchi wrote:So, just to be clear, is it completely impossible to use a linked_portal_door entity (a Portal 2 entity) in the same map as any modified code or custom entities? (I don't even need to change any Portal 2 entities - just the player, and create some new ones from scratch)Yes, unless you want to recreate the portal code from scratch.
Yes, unless you want to recreate the portal code from scratch.
Quote from Doomaflatchi on July 17, 2014, 11:10 pmFelixGriffin wrote:Yes, unless you want to recreate the portal code from scratch.*facepalm* If that's the case, how do people make custom gels without getting at the code?
*facepalm* If that's the case, how do people make custom gels without getting at the code?
Quote from TeamSpen210 on July 18, 2014, 12:22 amSicklebrick was able to edit the compiled code slightly to enable unused code, but I doubt you'll be able to add lots of entities that way. Reflection Gel is already in the game, just unpolished and unused. Other gels have been made in hammer using vscripts, triggers and other things like that.
Sicklebrick was able to edit the compiled code slightly to enable unused code, but I doubt you'll be able to add lots of entities that way. Reflection Gel is already in the game, just unpolished and unused. Other gels have been made in hammer using vscripts, triggers and other things like that.
[spoiler]- BEE2 Addons | (BEE2)
- Hammer Addons
Maps:
- Crushed Gel
- Gel is Not Always Helpful[/spoiler]
Quote from Doomaflatchi on July 18, 2014, 1:15 amWow, that's really troubling... well, doing my custom entities with purely in-engine scripting will be possible, I suppose (though likely frustrating). Any idea how "editing the compiled code" works, or what its limitations are? Or just where I can learn more about it?
Wow, that's really troubling... well, doing my custom entities with purely in-engine scripting will be possible, I suppose (though likely frustrating). Any idea how "editing the compiled code" works, or what its limitations are? Or just where I can learn more about it?
Quote from opticalprocessor on July 18, 2014, 7:04 amJust wanted to point out that the se2007 (portal, tf2 etc) leak exists, which would provide you with a variety (2) of options.
Option 1. Download the code and publish as an underground (illegal) mod.
Option 2. Download the code, study it and pretend that you simply came up with it (while still actually rewriting everything).
Just wanted to point out that the se2007 (portal, tf2 etc) leak exists, which would provide you with a variety (2) of options.
Option 1. Download the code and publish as an underground (illegal) mod.
Option 2. Download the code, study it and pretend that you simply came up with it (while still actually rewriting everything).
please
Quote from FelixGriffin on July 18, 2014, 9:34 amDoomaflatchi wrote:Wow, that's really troubling... well, doing my custom entities with purely in-engine scripting will be possible, I suppose (though likely frustrating). Any idea how "editing the compiled code" works, or what its limitations are? Or just where I can learn more about it?You run the game/dll through a x86 disassembler, edit the semi-obfuscated and undocumented assembly code by hand, then assemble it again and see if it works. Sickle was mostly fixing and re-enabling code that was already in the game, and it was still an incredibly massive and impressive undertaking. Adding a custom entity would be near-impossible.
You run the game/dll through a x86 disassembler, edit the semi-obfuscated and undocumented assembly code by hand, then assemble it again and see if it works. Sickle was mostly fixing and re-enabling code that was already in the game, and it was still an incredibly massive and impressive undertaking. Adding a custom entity would be near-impossible.