Custom Code in a Stand-Alone Mod
Quote from wrathofmobius on January 20, 2012, 11:39 pmJust a quick note - I apologize for the large amount of questions I've been asking lately. I hope it's just because I'm ambitious and not because I'm an idiot.
(Although those can overlap)
Anyway, my question is about env_projectedtextures. Only one can be active at once but I want more than one, so I found this fix: https://developer.valvesoftware.com/wik ... ture/fixes
It requires overriding Portal 2's code, but I'm not sure how to do it. I have a playable mod set up in the sourcemods folder but I wasn't able to find anything about overriding code for Portal 2. How do I do this?
Just a quick note - I apologize for the large amount of questions I've been asking lately. I hope it's just because I'm ambitious and not because I'm an idiot.
(Although those can overlap)
Anyway, my question is about env_projectedtextures. Only one can be active at once but I want more than one, so I found this fix: https://developer.valvesoftware.com/wik ... ture/fixes
It requires overriding Portal 2's code, but I'm not sure how to do it. I have a playable mod set up in the sourcemods folder but I wasn't able to find anything about overriding code for Portal 2. How do I do this?
[spoiler]WOM Test 1
Laser Cube Quest
Mho' Power - Community Spotlight!
Four Corners[/spoiler]
Quote from spongylover123 on January 20, 2012, 11:41 pmYou can, you need the program to code it, I think the entity is hard-coded in the game, so it can't me modified, unless Valve gives out the source code.
Alien Swarm's engine is almost like Portal 2, the source code is released, and they have the env_projectedtexture entity, try tinkering with that.
You can, you need the program to code it, I think the entity is hard-coded in the game, so it can't me modified, unless Valve gives out the source code.
Alien Swarm's engine is almost like Portal 2, the source code is released, and they have the env_projectedtexture entity, try tinkering with that.
Quote from wrathofmobius on January 20, 2012, 11:43 pmWhich program? Can you send me a link?
(BTW, congrats on post #22222 on the Mapping Help and Discussion forum)
Which program? Can you send me a link?
(BTW, congrats on post #22222 on the Mapping Help and Discussion forum)
[spoiler]WOM Test 1
Laser Cube Quest
Mho' Power - Community Spotlight!
Four Corners[/spoiler]
Quote from spongylover123 on January 20, 2012, 11:45 pmhttp://www.microsoft.com/visualstudio/e ... pp-express.
If you're on a Mac, X-Code.
http://www.microsoft.com/visualstudio/e ... pp-express.
If you're on a Mac, X-Code.
Quote from angelsl on January 21, 2012, 2:20 amValve never released the source to Portal 2's branch of the Source engine.
If you use Alien Swarm's engine, you probably won't be able to use portals and a lot of other things that were stripped out of the Alien Swarm branch.
Essentially, you can't apply that patch.
Valve never released the source to Portal 2's branch of the Source engine.
If you use Alien Swarm's engine, you probably won't be able to use portals and a lot of other things that were stripped out of the Alien Swarm branch.
Essentially, you can't apply that patch.
Quote from spongylover123 on January 21, 2012, 2:40 amThe OP only wants the code for that specific entity (env_projectedtexture) available in "ALL" Source games since EP2, so it doesn't matter where the/she gets it. It's the same.
The OP only wants the code for that specific entity (env_projectedtexture) available in "ALL" Source games since EP2, so it doesn't matter where the/she gets it. It's the same.
Quote from angelsl on January 21, 2012, 3:22 amspongylover123 wrote:The OP only wants the code for that specific entity (env_projectedtexture) available in "ALL" Source games since EP2, so it doesn't matter where the/she gets it. It's the same.You can't simply modify that one source file, compile it and stick it into the game.
It is not like textures, maps, sounds etc which are stored in loose files that you can easily change and replace.
Rather, this is compiled into native code as an executable file (.exe) or dynamic link library (.dll). You can't really 'open it up' like an archive and replace that 'entity'.
If you happen to know x86 assembly, you could take months to disassemble the engine and try to apply that patch.
You can't simply modify that one source file, compile it and stick it into the game.
It is not like textures, maps, sounds etc which are stored in loose files that you can easily change and replace.
Rather, this is compiled into native code as an executable file (.exe) or dynamic link library (.dll). You can't really 'open it up' like an archive and replace that 'entity'.
If you happen to know x86 assembly, you could take months to disassemble the engine and try to apply that patch.
Quote from spongylover123 on January 21, 2012, 4:02 amThey gave you the code. Not exe, not dlls. It's disassembled already. Try it yourself.
They gave you the code. Not exe, not dlls. It's disassembled already. Try it yourself.
Quote from angelsl on January 21, 2012, 6:45 amspongylover123 wrote:They gave you the code. Not exe, not dlls. It's disassembled already. Try it yourself.They gave you the code, but it's not the code for the Portal 2 engine. It's either Alien Swarm or Source 2007. If you have the code for Portal 2's engine branch, then show me. We'd all love to have it. But Valve never released it.
You can't compile only one class (taking the C++ file from Alien Swarm for example) and expect to shove it back into Portal 2. This isn't Java or .NET or a scripting language or the like where you can easily do this.
And you can't compile the code (with the patch applied) from another engine because that engine is not Portal 2's engine, and it will not have the Portal-specific engine modifications.
If you're so sure, why not you try it out? I'm not going to try something I know won't work.
They gave you the code, but it's not the code for the Portal 2 engine. It's either Alien Swarm or Source 2007. If you have the code for Portal 2's engine branch, then show me. We'd all love to have it. But Valve never released it.
You can't compile only one class (taking the C++ file from Alien Swarm for example) and expect to shove it back into Portal 2. This isn't Java or .NET or a scripting language or the like where you can easily do this.
And you can't compile the code (with the patch applied) from another engine because that engine is not Portal 2's engine, and it will not have the Portal-specific engine modifications.
If you're so sure, why not you try it out? I'm not going to try something I know won't work.
