• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Code barrel malfunction

Snipe34

Active member
Jun 3, 2009
42
0
39
middle England
I've avoided coding areas for a long time, but here I am, fukdefukdefukfuk

Not sure if anyone can help but I have quite a few other scripts that did fancy things in the KF mod, which I want in my new / ported, Tripwire maps, so with the barrels I thought I'd start asking.

First, the barrels worked ok in the KF mod. I knew transferring them to KF Tripwire that their calls sounds / tex / meshes would need changing, which I did roughly and would fine tune when I saw how the barrels ran.

ucc make says: Error: C:\Program Files\Steam\SteamApps\common\killingfloor\fngbarrels\Classes\FireBarrelGlob.uc(206) : Error, Redefinition of 'function takedamage' differs from original in Actor

I read on Wiki http://wiki.beyondunreal.com/Legacy:Compiler_Errors :Redefinition of 'function name' differs from original
When overriding functions you are not allowed to change the return type, the number or type of parameters or some of the function modifiers, e.g. static functions must stay static, public functions can't become protected. (E.g. simulated or native functions can become non-simulated or non-native in subclasses though, because those keywords only apply to the actual implementation in that single class.)
Functions can't be over ed in UnrealScript.


This means some functions weren't ported from the mod? I read on http://www.oldunreal.com forums that different games based on the same engine can differ greatly, obviously, but even basic codewise.

Fair enough, but I'd like some sort of exploding barrel. I commented the offending function // but other problems arose, so I thought I should ask. Even an overview would be appreciated.

Least I've learned about importing, exporting and compiling code, so I'll be canniblizing stuff for my anims / decos, and I did essentials in BF1942, porting a Heinkel into a map I made. The file structure was fairly similar, and I guess most game structures have filing similarities -- to let you know where I'm at. I also had a read Duckie's and Chicken's informative posts about the guns.

If anyone's interested I enclosed a link to the original barrels files for UT /KFmod, and my modification. Unmodified by me: http://www.usaupload.net/d/rgjv5qouc00 Modified by me:http://www.usaupload.net/d/lnu266e9kfx -- note: the mesh stuff is probably in the wrong place, but I was getting to that, then I was stumped by 'function.'
I should add, I only wanted the fire barrel, so I've only worked on that.

Thanks in anticipation.
 
ok i looking on your files you forgot some things:
(i only mod FnGBarrels.zip)

in FireBarrel.uc:

#exec obj load file=..\textures\FireBarrel.utx package=FireBarrel
#exec obj load file=..\staticMeshes\FireRock.usx package=FireBarrel

function TakeDamage
( int NDamage, Pawn instigatedBy, Vector hitlocation, Vector momentum, class<DamageType> damageType, optional int HitIndex)

in FireBarrelGlob.uc:

function takedamage( int Damage, Pawn InstigatedBy, Vector HitLocation, Vector Momentum, class<DamageType> DamageType, optional int HitIndex)

You need to change the reference to the same as killing floor look on .uc script...for compiling
 

Attachments

  • FnGBarrelsmods.zip
    9 KB · Views: 0
  • Like
Reactions: Snipe34
Upvote 0
ok i looking on your files you forgot some things:
(i only mod FnGBarrels.zip)

in FireBarrel.uc:

#exec obj load file=..\textures\FireBarrel.utx package=FireBarrel
#exec obj load file=..\staticMeshes\FireRock.usx package=FireBarrel

function TakeDamage
( int NDamage, Pawn instigatedBy, Vector hitlocation, Vector momentum, class<DamageType> damageType, optional int HitIndex)

in FireBarrelGlob.uc:

function takedamage( int Damage, Pawn InstigatedBy, Vector HitLocation, Vector Momentum, class<DamageType> DamageType, optional int HitIndex)

You need to change the reference to the same as killing floor look on .uc script...for compiling

Woot, Dany, you moved me along :) The ucc errors I get now I can cope with. They are only calls, I think probably involving the '..' or cd up (cd..), and I can fix those.

I'm not exactly sure what you mean by: You need to change the reference to the same as killing floor look on .uc script...for compiling but I will get to that later and by then I will probably understand.

Thanks for your time and effort fixing up that code -- much appreciated! The barrels are for the ported Gothic and other maps too if they fit the scenes.
 
Upvote 0
I replied yesterday already, but no reply has appeared. And seemed I was still logged in -- green hilight beside my name, but no. I had to log out, relog... It's just me :\ if there's a wrong way to do it, a right way screw it up ><

So anyway, as I said before in the as yet invisible post, most grateful to danny for fixing my omission error. Big THANK YOU :D

All I have to do now is fix calls I've moved gradually from 14 compile errors down to 9, so it's getting there.

A question regarding calls, and I'm doing this in a letterbox quickreply so bear with me xd

A couple of questions:
XEffect & mylevel I'm not sure where they come from... I can't find them in the uc files.

This is part directly below is copied from the compile errors below it and relevant to my second question:
--------------------------
Warning: Failed to load 'MeshEmitter KFMod.FlameThrowerFlameB.MeshEmitter18': Failed to find object 'MeshEmitter KFMod.FlameThrowerFlameB.MeshEmitter18'
Error: ObjectProperty Engine.Emitter.Emitters.Emitters: unresolved reference to 'MeshEmitter'kfmod.FlameThrowerFlameB.MeshEmitter18''

-------------------------
2nd question: I'm presuming that the call is to a class eg: actor.emitter.etc... and I've tried that, but it won't recognize it either (the original uc made references to various xemitter classes). My problems essentially are calls, well, how to write them so the compiler understands where to look. I'm trying various ways to write calls -- there's probably a doc somewhere that show how calls must be written (I checked thru RO forums but seems it's about texs and stuff with no mention of calls to effects)

So I'm stumbling in the dark.

The whole thing:

Warning: Failed to load 'myLevel': Can't find file for package 'myLevel'
Warning: Failed to load '..\StaticMeshes\FRock.usx': Can't find file for package 'myLevel'
Warning: Failed loading package: Can't find file for package 'myLevel'
Log: Failed loading package: Can't find file for package 'myLevel'
Log: Parsing DamTypeFireBarrel
Log: Parsing DamTypeFireBarrelGlob
Log: Parsing FireBarrelGlob
Log: Parsing FireBarrel
Warning: Failed to load 'XEffects': Can't find file for package 'XEffects'
Warning: Failed to load '..\StaticMeshes\FireBarrel.usx': Can't find file for package 'XEffects'
Warning: Failed loading package: Can't find file for package 'XEffects'
Log: Failed loading package: Can't find file for package 'XEffects'
Warning: Failed to load 'XEffects': Can't find file for package 'XEffects'
Warning: Failed to load '..\textures\FireBarrel.utx': Can't find file for package 'XEffects'
Warning: Failed loading package: Can't find file for package 'XEffects'
Log: Failed loading package: Can't find file for package 'XEffects'
Log: New File, Existing Package (Package FireBarrel, Package FireRock)
Warning: Failed to load 'myLevel': Can't find file for package 'myLevel'
Warning: Failed to load '..\staticMeshes\FireRock.usx': Can't find file for package 'myLevel'
Warning: Failed loading package: Can't find file for package 'myLevel'
Log: Failed loading package: Can't find file for package 'myLevel'
Log: Parsing FireBarrelFlameBig
Log: Compiling FireBarrelRocketMark
Log: Compiling FX_FireBarrel
Log: Compiling DamTypeFireBarrel
Log: Compiling DamTypeFireBarrelGlob
Log: Compiling FireBarrelGlob
Log: Compiling FireBarrel
Log: Compiling FireBarrelFlameBig
Log: Importing Defaults for FireBarrelRocketMark
Log: Importing Defaults for FX_FireBarrel
Warning: Failed to load 'NULL': Can't resolve package name
Warning: Failed to load 'StaticMesh None.FRock': Can't resolve package name
Error: ObjectProperty Engine.MeshEmitter.StaticMesh: unresolved reference to 'StaticMesh'FRock''
Warning: Failed to load 'MeshEmitter KFMod.FlameThrowerFlameB.MeshEmitter18': Failed to find object 'MeshEmitter KFMod.FlameThrowerFlameB.MeshEmitter18'
Error: ObjectProperty Engine.Emitter.Emitters.Emitters: unresolved reference to 'MeshEmitter'kfmod.FlameThrowerFlameB.MeshEmitter18''
Warning: Failed to load 'NULL': Can't resolve package name
Warning: Failed to load 'StaticMesh None.FRock': Can't resolve package name
Error: ObjectProperty Engine.MeshEmitter.StaticMesh: unresolved reference to 'StaticMesh'FRock''
Log: Bad UArrayProperty destruction: ArrayProperty Engine.Actor.Skins
Log: Bad UArrayProperty destruction: ArrayProperty Engine.Actor.Skins
Log: Bad UArrayProperty destruction: ArrayProperty Engine.Actor.Skins
Log: Bad UArrayProperty destruction: ArrayProperty Engine.Actor.Skins
Log: Bad UArrayProperty destruction: ArrayProperty Engine.Actor.Skins
Log: Bad UArrayProperty destruction: ArrayProperty Engine.Actor.Skins
Log: Bad UArrayProperty destruction: ArrayProperty Engine.Actor.Skins
Log: Bad UArrayProperty destruction: ArrayProperty Engine.Actor.Skins
Log: Bad UArrayProperty destruction: ArrayProperty Engine.Actor.Skins
Log: Bad UArrayProperty destruction: ArrayProperty Engine.Actor.Skins
Log: Bad UArrayProperty destruction: ArrayProperty Engine.Actor.Skins
Log: Bad UArrayProperty destruction: ArrayProperty Engine.Actor.Skins
Log: Bad UArrayProperty destruction: ArrayProperty Engine.Actor.Skins
Log: Bad UArrayProperty destruction: ArrayProperty Engine.Actor.Skins
Log: Bad UStrProperty destruction: StrProperty Engine.Inventory.ItemName
Warning: Failed to load 'explosions': Can't find file for package 'explosions'
Warning: Failed to load 'Texture explosions.Fire_quad': Can't find file for package 'explosions'
Error: ObjectProperty Engine.ParticleEmitter.Texture: unresolved reference to 'Texture'explosions.Fire_quad''
Warning: Failed to load 'Emitter': Can't find file for package 'Emitter'
Warning: Failed to load 'SpriteEmitter Emitter.FlameThrowerFlameB.SpriteEmitter27': Can't find file for package 'Emitter'
Error: ObjectProperty Engine.Emitter.Emitters.Emitters: unresolved reference to 'SpriteEmitter'emitter.FlameThrowerFlameB.SpriteEmitter27''
Warning: Failed to load 'Emitter': Can't find file for package 'Emitter'
Warning: Failed to load 'SpriteEmitter Emitter.FlameThrowerFlameB.SpriteEmitter28': Can't find file for package 'Emitter'
Error: ObjectProperty Engine.Emitter.Emitters.Emitters: unresolved reference to 'SpriteEmitter'emitter.FlameThrowerFlameB.SpriteEmitter28''
Log: Importing Defaults for DamTypeFireBarrel
Log: Importing Defaults for DamTypeFireBarrelGlob
Log: Importing Defaults for FireBarrelGlob
Warning: Failed to load 'VertMesh EffectsSM.Chunk1_Gibb': Failed to find object 'VertMesh EffectsSM.Chunk1_Gibb'
Error: ObjectProperty Engine.Actor.Mesh: unresolved reference to 'VertMesh'EffectsSM.Chunk1_Gibb''
Log: Importing Defaults for FireBarrel
Warning: Failed to load 'NULL': Can't resolve package name
Warning: Failed to load 'StaticMesh None.fireBarrel': Can't resolve package name
Error: ObjectProperty Engine.Actor.StaticMesh: unresolved reference to 'StaticMesh'fireBarrel''
Warning: Failed to load 'NULL': Can't resolve package name
Warning: Failed to load 'Texture None.fireBarrel': Can't resolve package name
Error: ObjectProperty Engine.Actor.Skins.Skins: unresolved reference to 'Texture'fireBarrel''
Log: Importing Defaults for FireBarrelFlameBig
Log: Compile aborted due to errors.
Log: Failure - 9 error(s), 0 warning(s)
 
Upvote 0