Extending an existing (stripped) package

Discussions about Coding and Scripting
User avatar
Barbie
Godlike
Posts: 2478
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Extending an existing (stripped) package

Post by Barbie » Thu Jul 21, 2022 8:21 pm

I want to extend the existing package "MapVoteULv1_2" and override the function KickPlayer() there.
The command line for compiling is

Code: Select all

%UTDIR%\System\ucc.exe make ini=%PROJECT_SRCCODE_MAKEFILE%
File "MapVoteULv1_2.u" exists in path "%UTDIR%\System\"
%PROJECT_SRCCODE_MAKEFILE%
Show

Code: Select all

[Engine.Engine]
EditorEngine=Editor.EditorEngine

[Editor.EditorEngine]
CacheSizeMegs=128
EditPackages=UnrealShare
EditPackages=MapVoteULv1_2
EditPackages=SBMapVoteV0

[Core.System]
Paths=../System/*.u
Paths=../Maps/*.unr
Paths=../Textures/*.utx
Paths=../Sounds/*.uax
Paths=../Music/*.umx
Paths=../System/3rd/*.u
Paths=../Maps/3rd/*.unr
Paths=../Textures/3rd/*.utx
Paths=../Sounds/3rd/*.uax
Paths=../Music/3rd/*.umx
SBMapVote.uc
Show

Code: Select all

// enabling the next line does not change anything:
//#exec obj load file=MapVoteULv1_2

class SBMapVote extends BDBMapVote;

function KickPlayer(int PlayerID, string PlayerName) {}
UCC.EXE says:
=======================================
ucc.exe: UnrealOS execution environment
Copyright 1999 Epic Games Inc
=======================================

--------------------UnrealShare--------------------
--------------------MapVoteULv1_2--------------------
--------------------SBMapVoteV0--------------------
Analyzing...
Superclass BDBMapVote of class SBMapVote not found

History:

Exiting due to error
Last edited by Barbie on Fri Jul 22, 2022 6:13 pm, edited 1 time in total.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

Buggie
Godlike
Posts: 1762
Joined: Sat Mar 21, 2020 5:32 am

Re: Extending an existing (stripped) package

Post by Buggie » Thu Jul 21, 2022 9:14 pm

You can not compile against stripped package.

This is why (just +1 reason more) source MUST be included. :mad2:

But you can create dumb placeholder package (stub) with possible implementation on it, compile against it, cross fingers and hope it work.

So you goes into UnrealEd. Make there somewhere class BDBMapVote, put it into package MapVoteULv1_2 (previously remove original one), place empty function KickPlayer, compile, save package, and use it as placeholder for compile against it.

User avatar
Deepu
Adept
Posts: 316
Joined: Mon Nov 11, 2013 7:56 am
Personal rank: Average
Location: India

Re: Extending an existing (stripped) package

Post by Deepu » Fri Jul 22, 2022 12:32 pm

I will share the source, don't worry