Tips

Using m25 AI in mods

Since this has been asked a few times, I’m going to put it on the blog so that it’s easily findable in the future.

How do you use m25′s AI in a mod or campaign setting?

Simple, dear asker. Just follow these steps:

  1. Import the FFX module using the following command: from ffx import *
  2. Under your OnPostInit() section, add the following lines of code:
    1. setMission(numerical value), InitScripts(), and FFX_InitMission()
  3. Still under OnPostInit(), add the following lines of code:
  4. heroes = getAllHeroes()
        for h in heroes:
        	SetupAI(h)
        	AIDisableCustom(h)
    
  5. And when you’re ready to activate the custom AI, call SetupAI() with the appropriate character name.

The completed file will look similarly to this:

# Sample

from cshelper import *
from ffx import *
   
def OnPostInit():
    print "start"
    setMission(1)
    InitScripts()
    FFX_InitMission()
    heroes = getAllHeroes()
    for h in heroes:
         SetupAI(h)
         AIDisableCustom(h)        

def super(event):
    m25ai.SetupAI('superguy')

That’s the gist of it, but if you want to know more about this process and what other commands you’re able to use, check out this thread: Using m25 AI. Hope this helps.

Merge To

How to Merge Dats

Merging dats is something that can be a little confusing the first few times you do it, so FRP2 decided to help you out with a little tutorial. Make sure you back up all your files before continuing!

More >

RMF008

Ghosting/Repeating Mesh tutorial

So, you’re having a problem with your FF1 meshes ghosting or “repeating” each other (animation wise) in FFv3R and have no idea how to fix it? Well, let me help you out with that. Follow along, students.

First of all, you’ll need the following tools. We’re going to be dealing with Python, so prepare yourselves. If you need help on where each file should be placed, click here.

More >

Coding Tip #10

Wow, talk about a large hiatus, huh? Let’s say you want to make a character (girl1) follow a hero (hero_1) every 10 seconds? How, exactly, would you set that up? Well, here’s a sample code that’ll do just that. Follow along:

More >

How to Install Custom Sounds in FFVTTR

The question has popped up enough that I took the time to write a small guide on it. Hopefully, this helps anyone that found the installation of FX sounds difficult.

More >

Coding Tip #9

In the old days before there was an ezscript, modders had to do things the hard way and learn python. And although Ezscript is able to pull off some amazing feats, having a bit of python knowledge to round out your skill set might just be a good idea. So, sometime around 2006 or 2007, I set out and made a guide to basic scripting which I figured could help some people jump into the modding circle. Unfortunately, I don’t recall an upsurge in modders after its release, but here it is for anyone that may or may not be curious as to how to mod Freedom Force using python.

Scripting Tutorial: The Basics

The tutorial is a pdf file and unfortunately, some of the links are broken. However, if you find yourself needing those links, you can find them below.

FFedit Tutorial by Tempest

Scripting Tutorial Example Mission/Py file

And that’s the tip for this week. Hope you enjoy it.

Coding Tip #8

The final coding tip from Jands and Lude. Hope you enjoy it.

Creating an Objective and an Item Drop

Editor issues as in Coding Tip #7

In the script you will need to call the routine for the first time, set the objective, and set an attribute to keep track of thugs ko’d:

More >

Coding Tip #7

Another Coding Tip from Jands and Lude. Enjoy!

Creating a Random Spawn

The only issue in the editor with this script is to check the level extents from the Mission tab.

More >

Coding Tip #6

Today’s (quick) tip:

Well, if you have ffx enabled in a mod, you can simplify a few commands to a single line of code. Say you want to move a bunch of controllable characters to the same spot for whatever reason. Well, in FFX, you can use this code:

More >

Coding Tip #5

Today’s tip:

Let’s say you want a target to teleport to safety when his health drops to a specified point. Well, that’s simple!

More >