Page 1 of 1

Extending an existing (stripped) package

Posted: Thu Jul 21, 2022 8:21 pm
by Barbie
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%

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

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

Re: Extending an existing (stripped) package

Posted: Thu Jul 21, 2022 9:14 pm
by Buggie
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.

Re: Extending an existing (stripped) package

Posted: Fri Jul 22, 2022 12:32 pm
by Deepu
I will share the source, don't worry

Re: Extending an existing (stripped) package

Posted: Fri Jan 20, 2023 8:47 pm
by Buggie
Here it with sources:
It slightly edited and conformed with original.

Changes:
- If MapListIfNooneVoted is zero then choose goes from all lists
- if MapListIfNooneVoted negative, then choose goes from all lists expect this one mentioned.
- RandomMapName specify substring for search and detect random map item.
- When used RandomMapName for vote, on won show exact map name instead.
- When used RandomMapName for vote, not happen bug with "server close connection" on server travel.

I think for your setup need change
MapListIfNooneVoted to -4.
RandomMapName you can keep as default value "(a random map)".

I use this map vote on VCTF, but in uz I left old version. So this not make troubles when travel among servers even if someone else also modify and conform package.

Automatically merged

And OFC you can compile own modules against this package and on server use old package with stripped sources, if you want so.

*** attachment removed, since it break net play ***

Re: Extending an existing (stripped) package

Posted: Sat Jan 21, 2023 5:22 am
by Deepu
Original SRC:
MVUv1_2_Source.zip
(199.32 KiB) Downloaded 5 times