I want to try my hand at some variations in some ChaosUT classes, and see that if I try to build, it cannot find the classes by name in my UC file.
EG:
if I want to subclass "sword" (th bastard sword), UCC complains it cannot find this.
Would I instead need to use "ChaosUT.sword"?
Or would i just need to reimplement?
Or would I have to add chaosUT to my build classes? Wouldn't this cause issues for execution of my code later, where it won't find chaos ut in the "global" or "default" scope when a player has an installation of ut99 from steam/gog?
Just curious on this process / how it builds for the UVM.
Subclassing / modifying chaosUT classes?
-
- Skilled
- Posts: 198
- Joined: Thu Apr 16, 2020 3:23 pm
- Personal rank: GameDev
Re: Subclassing / modifying chaosUT classes?
I use a separate INI for each of my projects. I assign it in a batch file:
Code: Select all
%UTDIR%\System\ucc.exe make ini=%PROJECT_SRCCODE_MAKEFILE%
Example MAKE.INI for SBSpawnPointV0
Code: Select all
[Engine.Engine]
EditorEngine=Editor.EditorEngine
[Editor.EditorEngine]
CacheSizeMegs=128
EditPackages=UnrealShare
EditPackages=SBSpawnPointV0
[Core.System]
Paths=*.u
Paths=../Maps/*.unr
Paths=../Textures/*.utx
Paths=../Sounds/*.uax
Paths=../Music/*.umx
make.cmd for SBSpawnPointV0
No documentation here; if you need, mention it plz.
Code: Select all
@echo off
rem root directory for projects:
set PROJECT_ROOT=H:\Games\UT\dev
set PROJECT_NAME=SBSpawnPoint
set PROJECT_VERSION=V0
set UTDIR=D:\Programme\UT
set UT_PROJECT_NAME=SBSpawnPoint
rem Move/copy the compiled version to PROJECT_SYSTEM? Set to "copy", "move" or anything else, if not action should be done. Implies compressing/moving to PROJECT_REDIR.
set COMPILED2PROJECT_SYSTEM=copy
rem ------ no need to change below stuff usually -------
set PROJECT_DIR=%PROJECT_ROOT%\%PROJECT_NAME%\%PROJECT_VERSION%
set PROJECT_SRCCODE=%PROJECT_DIR%\Sourcecode
set PROJECT_SRCCODE_MAKEFILE=%PROJECT_SRCCODE%\make.ini
set PROJECT_REDIR=%PROJECT_DIR%\Redirect
set PROJECT_SYSTEM=%PROJECT_DIR%\System
set PROJECT_FULLNAME=%PROJECT_NAME%%PROJECT_VERSION%
set UT_PROJECT_FULLNAME=%UT_PROJECT_NAME%%PROJECT_VERSION%
title %PROJECT_FULLNAME%
rem sanity checks:
if not exist %PROJECT_DIR%\NUL (
set ERRORMSG=PROJECT_DIR-directory is missing: "%PROJECT_DIR%"
goto Error
)
if not exist %PROJECT_SRCCODE%\NUL (
set ERRORMSG=PROJECT_SRCCODE-directory is missing: "%PROJECT_SRCCODE%"
goto Error
)
if not exist %PROJECT_SRCCODE%\make.ini (
set ERRORMSG=make.ini is missing in directory "%PROJECT_SRCCODE%"
goto Error
)
find /I "EditPackages=%PROJECT_FULLNAME%" %PROJECT_SRCCODE%\make.ini > nul
if errorlevel=1 (
set ERRORMSG=the line "EditPackages=%PROJECT_FULLNAME%" is missing in %PROJECT_SRCCODE%\make.ini
goto Error
)
if not exist %PROJECT_REDIR%\NUL (
set ERRORMSG=PROJECT_REDIR-directory is missing: "%PROJECT_REDIR%"
goto Error
)
if not exist %PROJECT_SYSTEM%\NUL (
set ERRORMSG=PROJECT_SYSTEM-directory is missing: "%PROJECT_SYSTEM%"
goto Error
)
if not exist %PROJECT_SRCCODE_MAKEFILE% (
set ERRORMSG=PROJECT_SRCCODE_MAKEFILE is missing: "%PROJECT_SRCCODE_MAKEFILE%"
goto Error
)
rem delete previous .U-file, if exist:
if exist "%UTDIR%\System\%UT_PROJECT_FULLNAME%.u" del "%UTDIR%\System\%UT_PROJECT_FULLNAME%.u"
if exist "%UTDIR%\System\%UT_PROJECT_FULLNAME%.u" (
set ERRORMSG=could not remove old file: %UTDIR%\System\%UT_PROJECT_FULLNAME%.u
goto Error
)
if not exist %UTDIR%\%UT_PROJECT_FULLNAME%\NUL mkdir %UTDIR%\%UT_PROJECT_FULLNAME%
robocopy %PROJECT_SRCCODE% %UTDIR%\%UT_PROJECT_FULLNAME% /MIR /njh /njs /ndl
echo .> "%UTDIR%\%UT_PROJECT_FULLNAME%\Do not edit these mirrored files"
rem cd %PROJECT_SRCCODE%
%UTDIR%\System\ucc.exe make ini=%PROJECT_SRCCODE_MAKEFILE%
if %errorlevel%==1 (
set ERRORMSG=An UCC error occured
goto Error
)
if NOT exist "%UTDIR%\System\%UT_PROJECT_FULLNAME%.u" (
set ERRORMSG=the file "%UTDIR%\System\%UT_PROJECT_FULLNAME%.u" does not exist!
goto Error
)
if "%COMPILED2PROJECT_SYSTEM%"=="copy" (
set CMD=copy
GoTo DoMoveOrCopy
)
if "%COMPILED2PROJECT_SYSTEM%"=="move" (
set CMD=move
GoTo DoMoveOrCopy
)
goto end
:DoMoveOrCopy
%CMD% %UTDIR%\System\%UT_PROJECT_FULLNAME%.u %PROJECT_SYSTEM%\
if exist %PROJECT_REDIR%\%UT_PROJECT_FULLNAME%.u.uz del %PROJECT_REDIR%\%UT_PROJECT_FULLNAME%.u.uz
%UTDIR%\System\ucc.exe compress %PROJECT_SYSTEM%\%UT_PROJECT_FULLNAME%.u
move %PROJECT_SYSTEM%\%UT_PROJECT_FULLNAME%.u.uz %PROJECT_REDIR%\
goto end
:Error
echo Error: %ERRORMSG%
goto end
:end
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
-
- Skilled
- Posts: 198
- Joined: Thu Apr 16, 2020 3:23 pm
- Personal rank: GameDev
Re: Subclassing / modifying chaosUT classes?
Does this ucc parameter "merge" with the normal ut ini? Or does it replace it / only the defined ini sections are replaced in the normal ut99 ini?Barbie wrote: ↑Thu Jan 20, 2022 11:52 am I use a separate INI for each of my projects. I assign it in a batch file:Code: Select all
%UTDIR%\System\ucc.exe make ini=%PROJECT_SRCCODE_MAKEFILE%
Example MAKE.INI for SBSpawnPointV0
Code: Select all
[Engine.Engine] EditorEngine=Editor.EditorEngine [Editor.EditorEngine] CacheSizeMegs=128 EditPackages=UnrealShare EditPackages=SBSpawnPointV0 [Core.System] Paths=*.u Paths=../Maps/*.unr Paths=../Textures/*.utx Paths=../Sounds/*.uax Paths=../Music/*.umx
Re: Subclassing / modifying chaosUT classes?
From my experience only the ini file given via INI=… on the command line is used.1337GameDev wrote: ↑Fri Jan 28, 2022 5:13 am Does this ucc parameter "merge" with the normal ut ini? Or does it replace it / only the defined ini sections are replaced in the normal ut99 ini?
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett