Giter Club home page Giter Club logo

cookiecutter-rimworld-mod-development's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cookiecutter-rimworld-mod-development's Issues

RimWorld "RimWorldWin64" renaming causing multiple issues

Problem

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.

Manual Workaround

  • Adjust "Start Action" paths for Debug and Release configurations under project properties to reflect the new executable name.
  • Remove incorrect References and add two new ones linking to the "Assembly-CSharp.dll" and "UnityEngine.dll" files in "...\RimWorldWin64_Data\Managed", then set "Copy Local" to "False" for both.

Issue with building from new

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' -----

Template copy commands fail for Linux-based systems

Problem

The cookie cutout doesn't work with Linux: all the copy commands are Windows.

Do This

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.

Localization of xcopy prevents build commands from working correctly on non-US systems

Problem

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.

Manual Workaround

Change the build event commands under project properties and replace the letters after the echo command according to your locales expectations.

Possible Fix (not tested)

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. :)

Issue with missing namespaces and indirect dependencies

Problem

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.

Cookiecutter Issue Assemblies

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 ?

Unable to complete installation Steps

Problem

Upon trying to complete installation steps, I ran into this error. Tried restarting my CMD a few times as well as the PC as a whole. No success.

image

Fix About.xml workflow

Use some more advanced scripting to automatically append " - Debug" to debug About.xml modNames rather than two different About files.

Can't install

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 .

Project and Assembly GUIDs should be unique

Problem

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)

Maybe Do This

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.

No debug version (also, no default version)

Problem

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>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.