Author Topic: How to change an Actor's Resource  (Read 1560 times)

Offline erebusant

  • Planewalker
  • *****
  • Posts: 20
How to change an Actor's Resource
« on: December 26, 2007, 05:55:05 PM »
The following bit of code will allow me to change the resource for Actor 1 in an area file. How do I modify it to allow me to change Actor 2's resource?

Code: [Select]
COPY_EXISTING ~AR1203.ARE~ ~override/AR1203.ARE~// I need to Change actor 2 Resource(Firkra02cre) to (b#fir01.cre)
  READ_LONG 0x54 "actors_offset"
  READ_ASCII "%actors_offset%"+0x80 "actor_file"
  PATCH_IF (("%actor_file%" STRING_COMPARE_CASE "FIRKRA02")=0) BEGIN
    WRITE_ASCII "%actors_offset%"+0x80 ~B#FIR01~
  END
BUT_ONLY_IF_IT_CHANGES

Offline Ascension64

  • Planewalker
  • *****
  • Posts: 472
Re: How to change an Actor's Resource
« Reply #1 on: December 26, 2007, 09:47:45 PM »
Code: [Select]
COPY_EXISTING ~AR1203.ARE~ ~override/AR1203.ARE~// I need to Change actor 2 Resource(Firkra02cre) to (b#fir01.cre)
  READ_LONG 0x54 "actors_offset"

  READ_SHORT 0x58 "actors_num"

  FOR( i=0; i<actors_num; i +=1 ) BEGIN
    READ_ASCII "%actors_offset%"+"%i%"*0x110+0x80 "actor_file"
    PATCH_IF (("%actor_file%" STRING_COMPARE_CASE "FIRKRA02")=0) BEGIN
      WRITE_ASCII "%actors_offset%"+"%i%"*0x110+0x80 ~B#FIR01~
    END
  END
BUT_ONLY_IF_IT_CHANGES

This checks all actors and replaces all cases of FIRKRA02 to B#FIR01.
« Last Edit: December 27, 2007, 02:22:31 AM by Ascension64 »

Offline Kulyok

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 6253
  • Gender: Female
  • The perfect moment is now.
Re: How to change an Actor's Resource
« Reply #2 on: December 27, 2007, 01:13:01 AM »
Panic, panic, what about Firkraag's romantic encounter!

Offline berelinde

  • Planewalker
  • *****
  • Posts: 1188
  • Gender: Female
    • Gavin, cleric of Lathander, for Tutu
Re: How to change an Actor's Resource
« Reply #3 on: December 27, 2007, 04:08:29 AM »
Yes, there are several mods that interject into Firkraag dialogue. It's probably best not to go reassigning this one. And yes, I remember what you're trying to do here.

It isn't quite as simple, but you can do the same thing a couple of different ways through reassigning the animation type for the cre and then using animation-changing effects. I haven't messed with spells before, but there's a first time for everything.

Check your PMs at SHS in a few minutes.

Offline erebusant

  • Planewalker
  • *****
  • Posts: 20
Re: How to change an Actor's Resource
« Reply #4 on: December 28, 2007, 03:42:42 AM »
@Kulyok - This actually would tie into Firkraag's romantic encounter quite nicely since with the "Improved" component, the fact that he is truly a Dragon is still hidden at State 26. That's a state I don't touch, and your dialogue begins by calling him Lord Jierdan anyway. I could use a script to change his animation similar to MALAR10.bcs from Region of Terror when you set the FirkraagFlirt Global to 1. Kind of catch him off guard with your comment enough to cause him to transform.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: