n-fisher / cookiecutter-rimworld-mod-development Goto Github PK
View Code? Open in Web Editor NEWA cookiecutter project that builds the basic Rimworld mod development file structure and build environment.
License: MIT License
A cookiecutter project that builds the basic Rimworld mod development file structure and build environment.
License: MIT License
RimWorld executable name was changed to "RimWorldWin64.exe" and "RimWorldWin_Data" to "RimWorldWin64_Data" after 0.19/1.0 versions, causing an error when launching the application and multiple warnings for incorrectly referenced "Assembly-CSharp" and "UnityEngine" dll files.
Not exactly sure what I'm missing, or if I've missed a step somehow. I set up git, python's latest and have a local installation of the cookiecutter program, but each time I try to build from new, it returns this code.
----- Creating files using template 'cookiecutter-rimworld-mod-development' -----
Traceback (most recent call last):
File "c:\program files\microsoft visual studio\2022\community\common7\ide\extensions\microsoft\cookiecutter\cookiecutter_run.py", line 22, in
from cookiecutter.main import cookiecutter
File "C:\Users\metro\AppData\Local\Microsoft\CookiecutterTools\env\Lib\site-packages\cookiecutter\main.py", line 33, in
REPO_REGEX = re.compile(r"""
^^^^^^^^^^^^^^^
File "C:\Users\metro\AppData\Local\Programs\Python\Python311\Lib\re_init_.py", line 227, in compile
return compile(pattern, flags)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\metro\AppData\Local\Programs\Python\Python311\Lib\re_init.py", line 294, in _compile
p = _compiler.compile(pattern, flags)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\metro\AppData\Local\Programs\Python\Python311\Lib\re_compiler.py", line 743, in compile
p = _parser.parse(p, flags)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\metro\AppData\Local\Programs\Python\Python311\Lib\re_parser.py", line 980, in parse
p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\metro\AppData\Local\Programs\Python\Python311\Lib\re_parser.py", line 455, in _parse_sub
itemsappend(_parse(source, state, verbose, nested + 1,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\metro\AppData\Local\Programs\Python\Python311\Lib\re_parser.py", line 841, in _parse
raise source.error('global flags not at the start '
re.error: global flags not at the start of the expression at position 1 (line 2, column 1)
C:\Users\metro\AppData\Local\Microsoft\CookiecutterTools\env\scripts\python.exe returned an exit code of 1.
----- Failed to create files using template 'cookiecutter-rimworld-mod-development' -----
The cookie cutout doesn't work with Linux: all the copy commands are Windows.
Linux has two different development compilers that I know of. One uses PostBuildEvent (msbuild), one uses CustomCommands (mono-develop)
I can put together a pull request, if you like.
Only explicitly defined folders get searched for XMLs, find out if there's a way to make it all subfolders.
The echo F|xcopy ...
trick to automatically answer xcopy's "Is it a file or folder?" dialog unfortunately doesn't work correctly under non-US locales. In my case the dialog will ask me this question in german and awaits either "D" for "Datei" (file) or "V" for "Verzeichniss" (directory) as user input. This will either cause an error and prevent the project from being built, because xcopy received unexpected input, or it might coincidentally receive unintentionally valid input (like "D" meaning directory in english, but file in german) and just not copy anything.
Change the build event commands under project properties and replace the letters after the echo command according to your locales expectations.
A bit of an undocumented hack that I discovered on Stackoverflow, is adding an asterisk (*) to the end of the path, which prevents xcopy from asking whether it's copying a file or a folder.
Maybe adding a notice about this issue to the readme would be enough to help out the international users of your template. :)
Recently setup cookiecutter to automate mod creation. Tried a test mod, and this was the error log I had.
1>B:\Dev\VS 2019\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3258: The primary reference "Assembly-CSharp" could not be resolved because it has an indirect dependency on the .NET Framework assembly "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework. 1>B:\Dev\VS 2019\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3258: The primary reference "Assembly-CSharp" could not be resolved because it has an indirect dependency on the .NET Framework assembly "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework. 1>B:\Dev\VS 2019\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3258: The primary reference "Assembly-CSharp" could not be resolved because it has an indirect dependency on the .NET Framework assembly "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "3.5.0.0" in the current target framework. 1>B:\Dev\VS 2019\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3258: The primary reference "Assembly-CSharp" could not be resolved because it has an indirect dependency on the .NET Framework assembly "System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework. 1>B:\Dev\VS 2019\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3258: The primary reference "Assembly-CSharp" could not be resolved because it has an indirect dependency on the .NET Framework assembly "System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "3.5.0.0" in the current target framework. 1>B:\Dev\VS 2019\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3258: The primary reference "Assembly-CSharp" could not be resolved because it has an indirect dependency on the .NET Framework assembly "System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework. 1>B:\Dev\VS 2019\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3258: The primary reference "Assembly-CSharp" could not be resolved because it has an indirect dependency on the .NET Framework assembly "System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "3.0.0.0" in the current target framework. 1>B:\Dev\VS 2019\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3258: The primary reference "Assembly-CSharp" could not be resolved because it has an indirect dependency on the .NET Framework assembly "System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework. 1>B:\Steam\steamapps\common\RimWorld\Mods\Test Mod\Source\Test_Mod.cs(2,7,2,15): error CS0246: The type or namespace name 'RimWorld' could not be found (are you missing a using directive or an assembly reference?) 1>B:\Steam\steamapps\common\RimWorld\Mods\Test Mod\Source\Test_Mod.cs(3,7,3,12): error CS0246: The type or namespace name 'Verse' could not be found (are you missing a using directive or an assembly reference?) 1>B:\Steam\steamapps\common\RimWorld\Mods\Test Mod\Source\Test_Mod.cs(5,7,5,12): error CS0246: The type or namespace name 'Verse' could not be found (are you missing a using directive or an assembly reference?)
I tried re-adding UnityEngine.dll and Assembly-CSharp.dll but continued to have this error.
Hello , i have a problem with cookiecutter. The problem is that in assemblies folder nothing creates after typing cookiecutter gh:n-fisher/cookiecutter-rimworld-mod-development in the cmd and following instructions. I already created few mods but now , when i generate folders, there is nothing in the assemblies folder. Maybe im doing something wrong or missing some steps but i dont know.
can you explain what should i do or if its not my fault - fix it ?
Use some more advanced scripting to automatically append " - Debug" to debug About.xml modNames rather than two different About files.
So there is a known issue that some users (like me ) can't see " RimWorldWin" to designate as startup project in Solution Explorer in VS
Can you help me and others fixing this issue / or by telling us how to fix it ?
Thats how it looks like in my VS ( it's in Polish cause it's my first language , sorry for that )
https://imgur.com/a/EcEaCab
I'm sorry if im just dumb and dont know basic stuff but im not proffesional and i followed all of the steps in the setup guide and this is where i stopped because i can't go further with developing my mod called "SleepGun".
Anyway i hope you will ever respond to this issue and help me .
The GUID for an assembly should, in theory, be a unique way to identify the .dll. However, all cookiecutter projects will have the same GUID. There are, as it happens, a few people who look for specific GUIDs when doing magicTM.
In addition, the project GUIDs should apparently be unique (which would prevent problems when moving projects from solution to solution? Most of us would never notice)
There's a command-line option to generate mostly-unique GUIDs in Linux, and there are web options, but I don't know about Windows, and I don't even know if cookiecutter can run commands. Maybe there is a library already in json? I haven't looked any further into this yet.
At a worst-case scenario, the user could be given a website suggestion and prompted to enter GUIDs?
But perhaps more research is required.
Make the assembly automatically linked on generation rather than needing other steps.
The newest version of the .csproj lacks the 'Debug|AnyCPU' configuration:
<!--old version, was not replaced-->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>false</DebugSymbols>
<DebugType>none</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Assemblies\</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
However, it's the default:
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
The debug version should probably be added back.
When adding it, it's probably a good idea to change DebugSymbols to true and to add the DEBUG symbol, so that DEBUG-only code works:
#if DEBUG
....do debug stuff
#endif
The line that monodevelop uses for this is:
<!-- inside 'Debug|AnyCPU'-->
<DefineConstants>DEBUG;</DefineConstants>
It would be nice if the user could specify what assembly folder to use instead of "Common" - they may prefer a different directory structure (e.g., 1.1/Assemblies, Assemblies, etc).
Fix this so they are loaded on creation, or checked frequently.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.