Skip to content

Need some assistance with a Cromwell/Cespenar item mod

Daeros_TrollkillerDaeros_Trollkiller Member Posts: 327
edited August 2019 in General Modding
Greetings, I am working on an item mod that involves giving new recipes to cromwell and cespenar and I am running into a hitch that I could use some help with. Using the below code (from a G3 forum post someone here was gracious enough to link to me) in my TP2 and plugging in item names I am using, the script gives me a parsing error at the first "IF" statement. If anyone is able to take a look at the below and tell me what I am doing wrong, I would greatly appreciate it.
BACKUP ~crom/backup~

AUTHOR ~Daeros_Trollkiller, at http://forum.beamdog.com~

BEGIN ~cromwell test~

EXTEND_BOTTOM WSMITH01 13
IF ~OR(3)
PartyHasItem("sw1h60")
PartyHasItem("bdsw1h02")
PartyHasItem("scrl7t")~ THEN GOTO PartyHasAtLeastOneItem
END

APPEND WSMITH01
IF ~~ THEN BEGIN PartyHasAtLeastOneItem SAY ~What's this then? Shards of a broken sword?~
IF ~PartyHasItem("sw1h60")
PartyHasItem("bdsw1h02")
PartyHasItem("scrl7t")~ THEN GOTO PartyHasAllParts
IF ~OR(3)
!PartyHasItem("sw1h60")
!PartyHasItem("bdsw1h02")
!PartyHasItem("scrl7t")~ THEN GOTO PartyDoesNotHaveAllParts
END

IF ~~ THEN BEGIN PartyDoesNotHaveAllParts SAY ~These are the remnants of an ancient, powerful blade. If ye find more of it, I can forge a mightly blade for ye.~
IF ~~ THEN GOTO MovingRightAlong
END

IF ~~ THEN BEGIN PartyHasAllParts SAY ~Aye, ye've collected the remains of an ancient blade . I can forge it into a mighty blade for ye.~
IF ~~ THEN REPLY ~What's would that take?~ GOTO HowMuch
IF ~~ THEN REPLY ~No, I'm not interested. Is there anything else you can use?~ GOTO MovingRightAlong
END

IF ~~ THEN BEGIN HowMuch SAY ~It'll cost ye 7,500 gold and without me apprentice, you'll need to stay on a day and help me run the forge.~
IF ~PartyGoldGT(7499)~ THEN DO ~SetGlobal("CDItems","GLOBAL",1)
SetGlobal("ForgeStuff","GLOBAL",1)
TakePartyGold(7500)
DestroyGold(7500)~ REPLY ~Yes, let's do it.~ GOTO 56
IF ~~ THEN REPLY ~No, I'm not interested. Is there anything else you can use?~ GOTO MovingRightAlong
END

IF ~~ THEN BEGIN MovingRightAlong SAY ~Well, let's see what ye've got then.~
COPY_TRANS WSMITH01 13
END

IF
Global("CDItems","GLOBAL",1)
Global("ForgeStuff","GLOBAL",1)
THEN
RESPONSE #100
SetGlobal("CDItems","GLOBAL",0)
TakePartyItem("sw1h60")
TakePartyItem("bdsw1h02")
TakePartyItem("scrl7t")
DestroyItem("sw1h60")
DestroyItem("bdsw1h02")
DestroyItem("scrl7t")
GiveItemCreate("dtkswd01",PLAYER1,0,0,0) // completed item
ActionOverride("wsmith01",StartDialogueNoSet([PC]))
END
[/quote]

Comments

  • jasteyjastey Member Posts: 2,780
    The dialogue code needs to go into an own file with the extension .d. You have it in the tp2 currently.
    The last block is a script block which needs to go into a file with the extension .baf, and which you need to EXTEND_BOTTOM to the appropriate script (I think the area script of Cromwell's forge).
    I'm on mobile so I can't help as much as I would like, but I'll be back on my comp on Monday.
  • Daeros_TrollkillerDaeros_Trollkiller Member Posts: 327
    Thank you Jastey, I'm a novice, but learning this fast. I greatly appreciate the help.
  • Daeros_TrollkillerDaeros_Trollkiller Member Posts: 327
    Jastey if you get the chance, if I could see the structure of how just adding one new recipe/item to cromwell or Cespenar works, I could probably build off of that. Again I really appreciate all your help!
  • jasteyjastey Member Posts: 2,780
    Answered here: https://forums.beamdog.com/discussion/comment/1090312/#Comment_1090312
    Maybe it would make sense to merge the two threads?
Sign In or Register to comment.