ok i thought i’d cheat and try and use the shooter code for my game, but i’ve failed badly due to the fact i don’t know what i’m doing.
i didn’t want my game to be called ShooterGame so i made a blank project copied all the source from the private folder and any other files i could find, renamed them and then used context editor to find and replace “ShooterGame” with UT40k.
now as you can guess when i try to build the solution in VS-express i get a load of errors, i realise i’m doing something wrong and i know i’m most likely not supposed to be doing this.
but as a none coder i’m a bit limited to what i can achieve, am i being naive in thinking it’s possible or is there a set workflow that’s required for possible start-up packs
Cheers George
any help or tips are most welcome
What sort of errors, in VS?
here’[s the first ten of 108
Error 1 error C2084: function ‘void AUT40kCamera::StaticRegisterNativesAUT40kCamera(void)’ already has a body C:\Users\Geodav\Documents\UT40k\Intermediate\BuildData\Include\UT40k\UT40k.generated.inl 9 1 UT40k
Error 2 error C2370: ‘AutoInitializeAUT40kCamera’ : redefinition; different storage class C:\Users\Geodav\Documents\UT40k\Intermediate\BuildData\Include\UT40k\UT40k.generated.inl 11 1 UT40k
Error 3 error C2084: function ‘UClass *AUT40kCamera::GetPrivateStaticClass(const TCHAR *)’ already has a body C:\Users\Geodav\Documents\UT40k\Intermediate\BuildData\Include\UT40k\UT40k.generated.inl 11 1 UT40k
Error 4 error C2084: function ‘UScriptStruct *FDecalData::StaticStruct(void)’ already has a body C:\Users\Geodav\Documents\UT40k\Intermediate\BuildData\Include\UT40k\UT40k.generated.inl 13 1 UT40k
Error 5 error C2374: ‘Z_CompiledInDeferStruct_UScriptStruct_FDecalData’ : redefinition; multiple initialization C:\Users\Geodav\Documents\UT40k\Intermediate\BuildData\Include\UT40k\UT40k.generated.inl 22 1 UT40k
Error 6 error C2084: function ‘UScriptStruct *FTakeHitInfo::StaticStruct(void)’ already has a body C:\Users\Geodav\Documents\UT40k\Intermediate\BuildData\Include\UT40k\UT40k.generated.inl 24 1 UT40k
Error 7 error C2374: ‘Z_CompiledInDeferStruct_UScriptStruct_FTakeHitInfo’ : redefinition; multiple initialization C:\Users\Geodav\Documents\UT40k\Intermediate\BuildData\Include\UT40k\UT40k.generated.inl 33 1 UT40k
Error 8 error C2084: function ‘void UUT40kTypes::StaticRegisterNativesUUT40kTypes(void)’ already has a body C:\Users\Geodav\Documents\UT40k\Intermediate\BuildData\Include\UT40k\UT40k.generated.inl 35 1 UT40k
Error 9 error C2370: ‘AutoInitializeUUT40kTypes’ : redefinition; different storage class C:\Users\Geodav\Documents\UT40k\Intermediate\BuildData\Include\UT40k\UT40k.generated.inl 39 1 UT40k
Error 10 error C2084: function ‘UClass *UUT40kTypes::GetPrivateStaticClass(const TCHAR *)’ already has a body C:\Users\Geodav\Documents\UT40k\Intermediate\BuildData\Include\UT40k\UT40k.generated.inl 39 1 UT40k
i think i’m going the wrong way about this, maybe i should NOT do any re-naming and try it that way, then just do new blueprints from the shootergame code
I agree. If you’re going through the example code and trying to rename everything, it is going to be a very tedious task. Even if you rename everything and it compiles, it will still act the very same way as it does now.
Looks like some duplicates in auto generated files. Have you tried removing Intermediate folder and running GenerateProjectFiles.bat (recreates project files for visual studio) ?
ok getting closer, the first problem was that some how i had 2 modules wanting to be Primary, how this happened no idea. then i had some errors in the menu system but solved them. now i’ve only these errors
Error 1 error LNK2001: unresolved external symbol “struct FLogCategoryLogUT40kWeapon LogUT40kWeapon” (?LogUT40kWeapon@@3UFLogCategoryLogUT40kWeapon@@A) C:\Users\Geodav\Documents\UT40k\Intermediate\ProjectFiles\Module.UT40k.cpp.obj UT40k
Error 2 error LNK1120: 1 unresolved externals C:\Users\Geodav\Documents\UT40k\Binaries\Win64\RocketEditor-UT40k.dll UT40k
Error 3 error : Failed to produce item: C:\Users\Geodav\Documents\UT40k\Binaries\Win64\RocketEditor-UT40k.dll C:\Users\Geodav\Documents\UT40k\Intermediate\ProjectFiles\ERROR UT40k
Error 4 error MSB3073: The command ““D:\Rocket\Engine\Binaries\DotNET\RocketUnrealBuildTool.exe” UT40k Win64 Development -rocket=“C:\Users\Geodav\Documents\UT40k\UT40k.uproject”” exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.MakeFile.Targets 38 5 UT40k
not sure how much of the default ini files to copy over,
ps using find/replace in the context editor makes things easier then save, after that use the bat to recreate the project files
Either add: DEFINE_LOG_CATEGORY(LogUT40kWeapon)
to your Private/UT40kModule.cpp, or remove all lines with this log category (Public/UT40k.h, Private/Weapons/UT40kWeapon_Instant.cpp)
As for configs:
- DefaultEngine.ini - copy at least CollisionProfiles, Kismet and URL sections
- DefaultGame.ini - entire file, rename to match your project & files
- DefaultInput.ini - entire file, just copy
Thank you Lukasz, after trying umtine times i clicked on to the difference between Public and Private, i must admit for me very confusing.
i think i’ll have to do more learning on C++ projects.
now to digg in and start learning more on the blueprint side of things
ok failed completely, the editor crashes now when i switch to the project
yes the dll is there with that name, so i think i’ll sack this idea as its causing more problems than it’s worth.
ok you know me i just can’t give up, Stephen as for the log when it crashed the editor, there i saw that it was looking for the blueprints, now why that would cause the editor to crash i don’t know but i used the migrate tool to move the content over now the editor starts np’s.
next problem is the VimPrints error bad cast node, i can see from the shootergame it casts to the shooter character but how can i edit the node or replace it as i can’t find a cast node !!! move fun but progress
Try adding bunch of redirectors to your DefaultEngine.ini, that will translate between classes upon loading, and then open unchanged content.
[Engine.Engine]
+ActiveGameNameRedirects=(OldGameName=“/Script/ShooterGame”,NewGameName=“/Script/UT40kGame”)
+ActiveGameNameRedirects=(OldGameName=“ShooterGame”,NewGameName=“UT40kGame”)
+ActiveClassRedirects=(OldClassName=“ShooterCharacter”,NewClassName=“/Script/UT40kGame.UT40kCharacter”)
+ActiveClassRedirects=(OldClassName=“ShooterWeapon”,NewClassName=“/Script/UT40kGame.UT40kWeapon”)
etc…
(not sure which version of game name redirector is correct, one of those will work)
GeoDav I see you’re up to your usual fun. cheers mate
When I get a chance I’ll see if I can sort thru those errors I am still away from home but if no one beats me to them I’ll help out as when I can.
Hi Emile, do we know each other !!!
ok i have actually got this working sort of, please don’t ask how as i’ve forgot most of what i’ve done to the code but one of the things was the gameinfo looking for the blueprint PlayerPawn so thats sorted. just need to find time to get my FP character sorted then i should be up and running.
side note i got a weapon into the shooter game quite easy so thats a bonus.
back to the rocket science lab 