How to use the editor to modify the contents of spacedebris?

Started by wangge502, May 07, 2021, 03:44:03 PM

wangge502

How to use the editor to modify the contents of spacedebris? Or how to add new things to it?
Core\Core.cpk\Scripts\StaticObjects\Misc\Events\ObjectSpaceDebris.cs
I found this file, but adding it will show an error,For example, I want to join GoldArmor or energy Cannon?
I dont use C++ :'( :'( :'(

ai_enabled

Hello!
Yes, you need to edit this file "Core\Core.cpk\Scripts\StaticObjects\Misc\Events\ObjectSpaceDebris.cs"
Use the text editor or IDE such as Visual Studio Core or Visual Studio 2019.
IDs of items you can find in Editor by using `/addItem` console command and looking into the autocomplete (but they need to start with "Item" prefix). The console can be opened by pressing ~ key (can be changed to any other key in the input settings).
With Visual Studio it's easier as it has autocomplete for class names and compiler to verify that all your changes are correct.

Regards!

wangge502

thank you. After I change the server into a modded server, is there any way to add mod only and my server will not change to modded, but continue to work on the community server?

wangge502

By the way, I built a dungeon in the game, but is there any way to make him appear monsters regularly? Now I put them in one by one with instructions. Is there any other way to make him appear in the map, or is there any instruction to let me put monsters back in one by one?

wangge502

Quote from: ai_enabled on May 08, 2021, 04:55:46 AM
Hello!
Yes, you need to edit this file "Core\Core.cpk\Scripts\StaticObjects\Misc\Events\ObjectSpaceDebris.cs"
Use the text editor or IDE such as Visual Studio Core or Visual Studio 2019.
IDs of items you can find in Editor by using `/addItem` console command and looking into the autocomplete (but they need to start with "Item" prefix). The console can be opened by pressing ~ key (can be changed to any other key in the input settings).
With Visual Studio it's easier as it has autocomplete for class names and compiler to verify that all your changes are correct.

Regards!
LIKE THIS    /spawn PsiGrove 
/spawn PragmiumBeetleMinion
/spawn Scorpion
I have to place the monster manually every time. Is there any other way∩╝ƒ  thank you~

ai_enabled

Quote from: wangge502 on May 09, 2021, 03:46:46 AM
thank you. After I change the server into a modded server, is there any way to add mod only and my server will not change to modded, but continue to work on the community server?
Not possible. The modified servers are clearly marked as such to make the players aware that they can experience all kinds of issues that are not present in the original game.

Quote from: wangge502 on May 09, 2021, 04:23:55 AM
Is there any other way to make him appear in the map, or is there any instruction to let me put monsters back in one by one?
Check how we use zones and attack scripts to them. E.g. we have a special zone to spawn creatures in ruins/radtowns. You can make your own zone and assign a spawn script to it with any creatures you want to respawn automatically.

Regards!

wangge502

Quote from: ai_enabled on May 09, 2021, 06:48:20 PM
Not possible. The modified servers are clearly marked as such to make the players aware that they can experience all kinds of issues that are not present in the original game.
Check how we use zones and attack scripts to them. E.g. we have a special zone to spawn creatures in ruins/radtowns. You can make your own zone and assign a spawn script to it with any creatures you want to respawn automatically.

Regards!

So how do I enter instructions? What should I write? thank you.

ai_enabled

Take as an example any existing Zone class e.g. ZoneRuinsMobsNormal.
You can create a new class similar to it but with a different file name and class name inside.
Do the same for SpawnMobsRuinsNormal and use this new class in your new Zone class.
When in Editor, switch (F8) to Editor mode and select Zone painting tool. You can paint your zone as you want. Press F2 to make a quicksave. Then try invoking the spawn scripts for the painted zoneΓÇöit will spawn the creatures. To revert, press F3 and you will load to the latest quicksave. Adjust the spawn script and repeat F2-spawn-F3 until you're happy with the spawn results.

Regards!

wangge502

Quote from: ai_enabled on May 10, 2021, 01:33:11 PM
Take as an example any existing Zone class e.g. ZoneRuinsMobsNormal.
You can create a new class similar to it but with a different file name and class name inside.
Do the same for SpawnMobsRuinsNormal and use this new class in your new Zone class.
When in Editor, switch (F8) to Editor mode and select Zone painting tool. You can paint your zone as you want. Press F2 to make a quicksave. Then try invoking the spawn scripts for the painted zoneΓÇöit will spawn the creatures. To revert, press F3 and you will load to the latest quicksave. Adjust the spawn script and repeat F2-spawn-F3 until you're happy with the spawn results.

Regards!
thankyou~
My server has modified core and added some weapons in it. But when the modification is completed, restart the server, others will not be able to enter the server to show that mod is not installed. Can I improve this problem?

wangge502

Quote from: wangge502 on May 11, 2021, 02:54:40 AM

thankyou~
My server has modified core and added some weapons in it. But when the modification is completed, restart the server, others will not be able to enter the server to show that mod is not installed. Can I improve this problem?
My server has modified the core and added some weapons to it. However, after the modification, when the server is re opened, other people will not be able to enter the server to show that mod is not installed. Is there any way to improve this problem?

wangge502

Auto-matching results: NONE prototypes were auto-matched.

Cannot auto-match these prototypes

ai_enabled

If you add new content, the client must be aware of it. Make a client+server mod, install it on the server and provide it to the clients.