Actor X already defined, renaming Actor to X@Y.wad

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
User avatar
StroggVorbis
Posts: 866
Joined: Wed Nov 08, 2017 4:23 pm
Graphics Processor: nVidia with Vulkan support
Location: Germany

Actor X already defined, renaming Actor to X@Y.wad

Post by StroggVorbis »

Example: Let's say we have SmoothDoom.pk3. In the root directory there's a DECORATE.txt with an #include Deco/Weapons directive. Under Deco/Weapons/Pistol, there is the PerkPistol actor which inherits from the base pistol. If I wanted to make a replacement addon for the pistol that is loaded after SmoothDoom, what is the right way to do it?

Can my .pk3 also contain an #include Deco/Weapons directive, or does it need to be named differently, for example Deco2/Weapons or Deco/Weapons2? I get an actor already defined error, even if I call it PerkPistol2. Is it because it points to SmoothDoom's Deco/Weapons directory and not my own? Also, can my pistol replacement inherit from SmoothDoom's Perkpistol or only from the native pistol? Do I have to redefine the Playerclass too?

I'm sorry if this doesn't make any sense or is incomprehensible. I tried to explain it as best as I could. I hope someone understands what I mean and can help me. Thanks in advance :(
User avatar
Apeirogon
Posts: 1606
Joined: Mon Jun 12, 2017 12:57 am

Re: Actor X already defined, renaming Actor to X@Y.wad

Post by Apeirogon »

Yes, you can. File path works inside single pack only. Other way we have errors when try load different mod which have one same path.
Already defined error? You try replace smootpistol just rewriting it, without change name?

Yes, it can inherit from smoothpistols. Just sure it load after smooth doom.

Return to “Scripting”