subclassing DC-Pawns2.Zombie

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

subclassing DC-Pawns2.Zombie

Post by Barbie »

I want to get rid of these repeating Accessed Nones:
UT log file wrote:Zombie MH-Salmagundi.Zombie46 (State DC-Pawns2.ZombiePawns.DoIdle:019B) Accessed None
by subclassing DC-Pawns2.Zombie and repairing it there:

Code: Select all

#exec OBJ LOAD File="..\System\DC-Pawns2.u"

class ZombieSB extends Zombie;

function PostBeginPlay() { // for now just a dummy
	super.PostBeginPlay();
	log(self $ ".PostBeginPlay done");
}
But UCC rejects compiling:
UCC.log wrote:Analyzing...
Superclass Zombie of class ZombieSB not found
History: UMakeCommandlet::Main
Exiting due to error
What did I wrong here?
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: subclassing DC-Pawns2.Zombie

Post by JackGriffin »

"Zombie" is a parent class in the same mod. You'll need to extract the entire mod in order to rewrite it so it compiles correctly. Let me know if you need help with that, I'll show you step-by-step if you need that.

Also let me know if you want the version of that map that is editable. I never strip anything I do but the brushes are removed from that map in a direct reference to Dane (he stripped everything lol). I never expected anyone would play that map honestly, it's horrible.
So long, and thanks for all the fish
sn260591
Average
Posts: 75
Joined: Sat Jun 01, 2013 10:38 am

Re: subclassing DC-Pawns2.Zombie

Post by sn260591 »

Try to add a line to UnrealTournament.ini

Code: Select all

[Editor.EditorEngine]
...
EditPackages=DC-Pawns2
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: subclassing DC-Pawns2.Zombie

Post by sektor2111 »

This issue looks like a dependent class is missing.
Solutions:
- Load dependent package (if needs);
- Use a Place-Holder.
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: subclassing DC-Pawns2.Zombie

Post by Barbie »

sn260591 wrote:Try to add a line to UnrealTournament.ini

Code: Select all

[Editor.EditorEngine]
...
EditPackages=DC-Pawns2
Whow, that was too easy... Thanks for that hint! :tu: I thought it would be enough to load it with the "#exec OBJ LOAD" statement. (And I want just mention that the order of EditPackages have to follow the package dependencies.)
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: subclassing DC-Pawns2.Zombie

Post by JackGriffin »

It is enough to obj load it but it requires a specific set of imports. Take this for example from the dragons I was working on:

Code: Select all

#exec obj load file=..\textures\INIFireFly.utx package=INIsDragons
When you import a package using exec obj load and you set "package=<yourcurrentmodname>" then it will import the package into the current mod and you won't need to do anything else. This is super helpful when you have animated textures (like this Firefly) but you don't want to have an associated package. Anyway set your load line so that the package equals your current mod name and try all this again.
So long, and thanks for all the fish
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: subclassing DC-Pawns2.Zombie

Post by Barbie »

JackGriffin wrote:Also let me know if you want the version of that map [MH-Salmagundi] that is editable. I never strip anything I do but the brushes are removed from that map in a direct reference to Dane (he stripped everything lol).
I already noticed that all brushes (except Brush0 :lol: ) are missing in that map... Is there any reason with nowadays bandwidths for this except annoying others? By feeding my MH server with maps (mainly from Medor's place) I found that about 20% of the maps have to be fixed either from server side or by editing the map directly and releasing it with a modified name. And missing brushes does not simplify that job. :omfg: But ATM I do not need an editable version, thanks.
JackGriffin wrote:I never expected anyone would play that map [MH-Salmagundi] honestly, it's horrible.
The first part is nearly the same as - oh well, I cannot remember all these map names -, but the second part (100 Brutes, 100 Kralls, but with bShockRifle) was new to me. And while inspecting the map with the editor I've discovered the adults separee... :oops:
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: subclassing DC-Pawns2.Zombie

Post by sektor2111 »

Barbie wrote:Is there any reason with nowadays bandwidths for this except annoying others?
I wouldn't be worried about that. Some stuff which was in purpose to prevent easy thievery was stripped on purpose. There are people which were doing something and others used to ruin things, then solution was a basic strip making life harder for those which uses to copy things from Levels in purpose to do other "their" almost without to work and claiming "MY MAP". Recovering brushes needs a bit of work so any noob won't do major damage. You can see right a few next topics behind the same thing.
The only annoying occurrence is to find stuff damaged and stripped making fixing harder than expected.
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: subclassing DC-Pawns2.Zombie

Post by JackGriffin »

That's the only thing of mine you'll find that was publicly released that was stripped. As I said it was because Dane stripped everything and I made the map for him. I offered the brushed map to everyone too but no one wanted it so I never followed up with it. Later on when the map started showing up on servers it was the stripped one that was used.
So long, and thanks for all the fish
MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: subclassing DC-Pawns2.Zombie

Post by MrLoathsome »

I subclassed a Zombie once.

Didn't like it. No sir. :mrgreen:

But seriously, if somebody was to add some crawling animations to the TWT Zombies models, I bet I could
make em crawl up the walls, and perhaps the ceilings. (At least online....With a 436 server.)

Back on topic.

Is there a difference there in the complied U file?

Or will the result be dependent upon the presence of the EditPackage class or OBJ LOAD object
in either case? (ie does OBJ LOAD include the object in your U file so that the dependency goes away?)

Also, I don't know nothing about no brushes. :pfff:
blarg
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: subclassing DC-Pawns2.Zombie

Post by JackGriffin »

Yeah, there's a fundamental difference in OBJ LOAD'ing between the two different ways. Properly importing using the current mod as the package name removes the need to have the extra package AT ALL. Messing that up still lets you OBJ LOAD the file to compile but you'll need to have the extra file installed to use it.

You can easily test this by LOAD'ing some extra package into whatever mod you are using then trying the mod after taking the LOAD'ed package out of your install for a moment. You'll see the new mod works even though you removed the other file. Cool, huh? I wish I had known this a long time ago, it used to drive me up THE FUCKING WALL that I couldn't figure out how whomever it was (Gizzy?) imported the portal gun wet texture yet I couldn't decompile it properly. I could see the OBJ LOAD imports and the wet texture name being called but I just couldn't find it in the package. That's because it existed as an external utx and got loaded into the mod via this command. Now I do this all the time and it's great.

Caveat: (there's always one, isn't there?)...You can't LOAD a package that has sub-dependency. I know this seems obvious but you can only load the package you need and it won't grab any that IT needs. Am I making sense? Say you want to import package A but it needs package B to work. It won't do right in this instance. As far as I know this isn't possible, but I've never tried LOAD'ing two files that had dependency on each other. It would almost never happen anyway.

Whew.
So long, and thanks for all the fish
Post Reply