Substring Replace Update

When Multimedia Fusion 2 came out, String Parser 2 was not ported to it. Thus Workshop2 requested an object which can replace substrings with an expression, and I made it.

However, I also made a horrible icon for it and I didn’t change the template in many ways. It was a very much a ‘quick and dirty’ job and I really didn’t think people would use it for more than a few weeks.

However, it turns out some people did persist on using it and I noticed a while ago that actually it seems fairly well used. For me it just seemed to clutter up the extension list with its uglyness:

Ugly Icon

The ugly icon: A green 'S' on a purple background

After I mentioned this in a post recently, Variant drew a new icon. And so I made some new features to go with it. It is completely compatible with the old version but it has a couple new actions and a new expression (as well as actually having properties in the frame editor and the new icon). The actions let you collect a collections of strings to replace with other things.

At the simplest level, you can use this to replace a string with another string. However, you can also replace a string with another string derived from a global value, global string or an array entity. If this proves something people like I will add support for other objects and values, starting with Active Objects.

You can also have macros, which are strings which are themselves ‘replaced’.

This is something I’ve wanted to do for a while. It was going to be one of the features of Ini++ v1.5 (although only for Ini items of course) but I think it works better like this. I think it is pretty cool to have it dynamic like this. I have no idea how it will go down.

The sort of application I was thinking of is a story-driven game where various scripts are read from the text file for dialogue. Then you can, at the start of frame, set up things like $NAME (using just a string replace) and $HP (maybe from a global value) or whatever and then it is minimal effort.

Substring Replace Icon Download

(Follow the link and it is at the bottom of the page in ‘Attachments’)

Edit: Updated so now actually compatible with old version and the example works again.

Advertisements

One Response to Substring Replace Update

  1. Wiley says:

    Great object, but I cant get the array function to work.. the object shows an error message saying the array object is not there even though it is.. latest version of fusion 2.5 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: