• Welcome to Freedom Reborn Archive.
 

tommyboys incessant questions thread.

Started by tommyboy, May 24, 2007, 01:17:30 PM

Previous topic - Next topic

tommyboy

1. I want to use a car in the Freeroam campaign as a quick method of travel to maps that are not adjacent.
The idea is that parked outside the base is an empty car with a position marker or custom command. Said custom command would bring up a menu of all the maps in the Freeroam world. Once you select one, the car drives to the far end of the map from the base, and disappears, then the selected map loads, the car is respawned in it. I also want the car to be empty before you "get in car"(as the custom command would read), then be replaced by a model with characters in (obviously I'll make these models myself IF it'll work).

2. My "Angel:City of Angels" Mod features Vampires. Lots and lots of Vampires. Whom I make "vulnerable" to "day", so they burst into flames and lose health when its daytime, and Angel has to retreat "indoors" to the fortressbase to wait for dark. What I want is to be able to make certain maps always nighttime (ie the sewers, the "indoor" maps like the base or nightclub etc etc), so he can travel between maps underground in the "daytime", or if he gets caught outdoors by the dawn.

3. Is "bloodsucker" actually implemented/working in the latest FFX? I see it in the FFX.py, but not in the Documentation or Attributes List in the Editor.
 

bluestreak

I'm no help on 1 or 2, but BLOODSUCKER was phased out in favor of the new LIFE DRAIN attack type. You might be able to reactivate it by making a new attribute called "bloodsucker" in FFedit.

Lunarman

For two you should be able to copy the lighting settings from a nightime mission, such as the Timemaster one. If that makes it all too dark you could manually add lights to the mission. I don't know though how day and night are calculated, whether it be by the sunsettings, lights in the mission or some obscure piece of scripting somewhere else.

M25

I've put together a quick freeroam plug-in that should work for #2. 
http://members.shaw.ca/m25/freeroam_makenight.zip
Put it in your mod/missions/scripts/ffxplugins/active directory, then open up the .py file and change the line

makenight_maplist = ['sewer','tophat','fortress']

to include whatever maps you want to be considered night.


The first part could be done, but I'll have to give some thought to it. 

Moving a car in a straight line could be done with Conduit's stutter functions, though getting it to drive along the roads would be considerably more work.  Making the car a character instead of an object would be easier for scripting.

I have an EZ script encounter called SimpleChoice that lets the player pick from a number of choices.  All that's really needed is code to let the player characters get in the car and to swap the car models, and an encounter type that moves the player to a different map automatically.


As a simple substitute, you can place 'to_<mapname>' markers around the car, and the player would then be able to travel to any of the maps specified. 


tommyboy

Thanks guys.
M25, cheers for the plugin, you are a gentleman and a scholar.

tommyboy

Further pursuant  to the night and day theme:
I am using my Skyspheres to add atmosphere to the levels, and I want to be able to change them over as day shifts to night then back to day.
I want to have a daytime skysphere and a nightime skysphere, and switch between them.
Now the obvious route is to simply object_destroy and object_spawn them at the right time.
Or maybe have one slightly bigger than the other so only the inner one needs to be spawned and destroyed.
My question?
Am I correct in thinking that its in this bit of code in "freeroam.py" that I should insert the skysphere_day and skysphere_night
[spoiler]
def FreeRoam_Lights(index):
    pairs=(('pat_streetlight','pat_streetlight_night'),('pat_park_lamp','pat_park_lamp_night'),('pat_hotdog_stand','pat_hotdog_stand_night'),('pat_phonebooth','pat_phonebooth_night'),('skysphere_city_day','skysphere_city_night'))
    for o in Mission_GetObjects():
        if Object_GetAttr(o,'health')==Object_GetAttr(o,'maxHealth'):
            t=Object_GetTemplate(o)
            for pair in pairs:
                if t==pair[0] or t==pair[1]:
                    name='o%s'%(o)
                    if o[0]=='o':
                        name=o[1:]
                    spawn(name,pair[index],o)
                    alignWith(name,o)
                    Object_Destroy(o)
[/spoiler]

like wot I have done?
Arrhh...I'll just go try it out...

M25

That should work, but you need to put the code in m25freeroam.py if you are using EZ script.   freeroam.py is there for compatibility with the original patriot city mod.


Lunarman

It might be worth making an animated texture for this really. You've got max at your disposal so it's possible.  You could have a nif with 5 textures, one day, one dusk, one night, one dawn and a texture that comes up between dusk and dawn. That way you'd get a very smooth transition and it would look great. You'd wouldn't have to do much work either since the textures can pretty much be recolours of each other (unless you're using the city skin in which case the lights would have to come on.

If you do do that could you release it, with animated sky spheres there's a lot of possibility. Moving clouds, aeroplanes :) Just think

Good luck :)

tommyboy

Quote from: Lunarman on June 03, 2007, 12:18:51 AM
It might be worth making an animated texture for this really. You've got max at your disposal so it's possible.  You could have a nif with 5 textures, one day, one dusk, one night, one dawn and a texture that comes up between dusk and dawn. That way you'd get a very smooth transition and it would look great. You'd wouldn't have to do much work either since the textures can pretty much be recolours of each other (unless you're using the city skin in which case the lights would have to come on.

If you do do that could you release it, with animated sky spheres there's a lot of possibility. Moving clouds, aeroplanes :) Just think

Good luck :)

Yes I'd considered that possibility too. But was daunted by getting the timing right, as if the skysphere got out of sync with the freeroam lighting it'd look odd, to say the least.
Because the lighting changes gradually I'm going to stick with a straight swap for now, but may experiment with animated textures.
The one drawback is that the textures for skyspheres need to be big to look good. They are the biggest in game object there is, and you are standing right next to them at the maps edge. So I worry about 5 times 5Mb textures for a single sky. But maybe I can find a workaround..