Possible Bug in SetTechtArtifactType with Pulsecannons

Started by Vanguard, April 18, 2014, 07:05:14 AM

Previous topic - Next topic

Vanguard

I decided to open a new topic instead of using the old one (http://knucklecracker.com/forums/index.php?topic=16041.0), which is a seperate issue from this one.

Proof of Concept


# This code shows that Pulsecannon as an argument to SettechArtifact is bugged
# The List of Arguments was taken from the SetTechArtifactType Page via Copy and Pasta (yumm!)
# http://knucklecracker.com/wiki/doku.php?id=crpl:docs:settechartifacttype
once
"COLLECTOR,RELAY,REACTOR,OREMINE,SIPHON,TERP,GUPPY,PULSECANNON,MORTAR,STRAFER,
BOMBER,SPRAYER,NULLIFIER,SHIELD,BEAM,SNIPER,FORGE,BERTHA,THOR,COMMANDNODE" "," split ->UnitList
<-UnitList GetListCount 0 do
"TECHARTIFACT" I 1 add 3 mul 45 CreateUnit ->id
<-id <-UnitList I GetListElement SetTechArtifactType
<-id 0 "COUNT" I setscriptvar
loop
endonce


As you can see in the picture, Nr. 7 does not have a Pulsecannon Image and when selected shows as "COLLECTOR" which seems to be the default tech type for Artifacts.

Can someone please confirm, that it isn´t just me being stupid again?  :-[

knucracker

Looking at the game code, looks like the type should be "CANNON" rather than "PULSECANNON" for the call to SetTechArtifactType.

Vanguard

Ok, Cannon works. Thanks. I posted a comment on the Wiki page, so others won´t have the same problem.

asmussen

#3
I've corrected the error on the CRPL reference page for SetTechArtifactType on the wiki.

I also noticed that PULSECANNON is listed as a unit type for both the GetUnitType and CreateUnit commands in the reference. Should those be CANNON as well?
Shawn Asmussen

knucracker

I think the other references are right.  I was jut brain dead when I did the SetTechArtifactType command.  It really shouldn't even have been a separate command, but I did it before the support for attributes.

planetfall

Confirmed that GetUnitType and CreateUnit use "PULSECANNON".
Pretty sure I'm supposed to be banned, someone might want to get on that.

Quote from: GoodMorning on December 01, 2016, 05:58:30 PM"Build a ladder to the moon" is simple as a sentence, but actually doing it is not.