Back to Main Page


This page is about my Players Extended mod, a mod that throws open the world of addon peds, making them accessible and more interactive than ever.

WARNING! This is my therapy mod, this is intended to keep me away from the edge... Content on this page could get feisty on bad days, which are every day. If you want jolly stories about mod development, this probably isn't the page for you.

This hasn't been a free-flowing project like my others, this really is a battle of wills to keep going and I lose that battle a lot. Some days just a couple of lines of code get written, other days see more happening... but it's hard to keep this going, really hard.

I don't expect people to understand just how critical this mod is, I don't expect them to care how critical it is... but this is a make or break mod for me.

Page 1

Page 2

Page 3

Page 4

Page 5

Players Extended - Addon peds at your fingertips (Page 2)


This is the continuation of the Players Extended Development Saga.

Tough day today, so it's been a mixed bag of success, failure, rage and some more rage. I ruined an irreplaceable glass yesterday with a non-scratch cleaner, that scratched the f**k out of it. Mandy bought it for me from Kennedy Space Centre in Florida in 2006, so I can't just nip over and get another. So that already set things on a downward spiral and then today I had an infuriating form to fill in.

Anyway, the success came from me getting the new Add Player screen working. The whole reason behind the photos of the houses, was because of the vision I had for this screen. I will post the short video first and then explain more about it afterwards.

The idea was to have an official looking document but it had to display a familiar grime feeling, like is so common in the game. It's a dodgy estate agent, re-using old government documents that have been around the block many times. But I also wanted it to feel like you were flicking through sample photos of the houses that you could get.

The photos are given a base position in the centre of the document text. On top of that, they are given a random +/- 10 pixels in the X and Y, so you don't get the same stack of photos every time. The movement is a simple Cubic easing function out to the side, re-order the levels to put the front image to the back, then ease it back into position. It's pretty basic stuff but if your head is in the wrong place, it can take its toll.

The other time consuming task was the text at the bottom. I had forgotten that UIDrawtexture always appears over UIText. So after spending far too long cursing because the text wasn't appearing, I suddenly realised that it was behind the image. So I had to cut a hole in the image to show the text, which meant I had to try and position a UIContainer, with three UIText components attached, in just the right place so it looked part of the document.

You can see the checker pattern in this image, that's the transparent section. The other drawback of having to do this, was it meant storing the image as a png instead of a jpg. That bumped the size up considerably, which wasn't good. I am getting many crashes with this mod, I think the excessive map loading and the images are causing problems. R* clearly have a trick up their sleeve when they do player switching but I just don't know what it is. I am also wondering if there is a memory leak in the UIDrawtexture stuf, where it's not flushing unused textures when I reset the scripts and it's causing a memory crash. I have never had this level of instability with a mod before, it's not exactly a complex mod, compared to say WGS or DIS. If it is the switching causing a resource overload, then I have a problem, because I don't know how to do it any other way.

I still need to add some final polish to the screen, so it exits better but overall, it works on-screen, like it did in my head, so that's good enough for me. It's not as if it has to meet the high standards of the modding community anyway, although after what I saw today on a certain site, I don't think there are any standards anymore. It beggars belief that a high quality vehicle mod gets ignored, while a shitty, half-finished BETA mod gets featured and endless "perfect" ratings. I pity the few good modders left out there, I really do. When BETA = Perfect, you know it's time to move on. I hope the good ones left realise that and take their talents elsewhere.

Update: Since writing this page earlier, I have now added a final stage to the screen with an approved stamp appearing with a sound effect. I have also pre-rotated the images slightly, as adding scripted rotation just didn't work. Something screws up when you rotate an image, it seems to stretch it sideways and squash it vertically. Even with perfectly square textures it does it and I have no idea why. It seems like the matrix is being applied in the wrong order...

Update: Finally got to the bottom of the sprite rotation issue, I would never have worked it out without JulioNiB's speedo tutorial. The solution was just so bizarre, I don't understand why it has to work like it does but at least it does. So I have now got the images applying a random rotation within a small range, 0.95f to .05f when the screen is shown, so the images now change position and rotation each time you enter the screen. It's a simple thing but it stops the screen from looking so predictable.

I keep discovering these new things and I just wish I had discovered them a year or more ago... seems so pointless learning new things now. It's like winning the lottery when you're 95.

Update: Added the final piece of info I was missing on the character wheel, that's info about the character currently selected. It's a simple design but it displays the info in a connected and unintrusive fashion. The coloured bar on the end is the colour of the house they own.

It's tempting sometimes to think "Ooooh, let's make it slide in and out from behind the wheel" and whilst that might look nice in theory, when you have an element that allows for rapid switching between selections, you don't want things that add nothing but a delay to proceedings.

Update: Amusement and annoyance tonight. When I create mods, or any software, I usually put functions into the wrong classes, which I did with the money display in this mod. So I moved everything into the main class but put the AddMoney and Subtract money the wrong way round. So every time I picked up a money bundle, I lost money... which was an amusing cock-up. The annoyance was caused by my inability to listen to myself, I have to tell myself to not do something and then within 5 minutes, I do it and cause problems.

Oh, actually, there was another annoyance... no shocker with this one... SHVDN, didn't bother to implement the animation flag for EnablePlayerControl. I mean, what is the point of that? Let's play animations while we stand still, 'cos that's great when you want to walk round holding something... DERP!!!

Speaking of walking round holding things... tonight I started on another collection of tasks, accessories. As part of the ped's interaction with the world, I want them to be able to carry things, like holding food/drinks or carrier bags etc... so the first accessory, is an umbrella.

I thought there were two sizes, because there's p_amb_brolly_01 and p_amb_brolly_01_s. I thought at first that the _s version was going to be small. It looks the same size though, just grey instead of blue. But this means now that if it starts to rain, I can walk round with an umbrella, which just makes a bit more sense. I liked that WOV added that to the peds... and the bag carrying but it comes at too high a price, WOV is just too erratic in behaviour.

I wish Props had a kind of livery support... or maybe they do... I am thinking about those props that have a grayscale texture and a colour palette that gets used to tint them. That would be perfect for umbrellas, I might investigate that further at some point.

What I do need to do, is create a prop attachment mod, so that I can quickly attach a prop and then adjust it with the gamepad until it fits perfectly. Changing values, resetting scripts, changing values etc... is not the way to do things, especially with the crashing problem I am having.

Update: Umbrellas and two-handed shopping, this was another pair of ideas that have always been part of this mod plan. I wanted to give the player the ability to carry an umbrella but I also wanted to let them carry bags. The bags will be more important as I begin to integrate the World Guide Locations into the mod. But animations in this game all tend to be right handed, so it seemed as though there would be a limitation. With the bags however, how they fit in the hand isn't quite so critical.

The umbrella just had to be attached in a reasonable location and then made to appear in sync with the animation sequence. This was made much easier having created my prop attachment tool. I have an animation player already, so I simply find the animation, play it looping and then call up the attachment tool. Spawn the prop, attach it at a default position and then use the controller to adjust the values until it fits. Once that's done, hit the menu option to save the values and it outputs the position and rotation value in a text file. I transfer those into the PE activity class and the prop attaches in the exact position. I can switch between left and right bones in the tool, so I can create left and right handed offsets/rotations really quickly.

I store those in two Dictionary<string, AttachPair> dictionaries (one for each hand) with the prop name as the dictionary key. So each bag prop can have its own AttachPair, it makes it easy to add a carrying activity, which all gets configured based on the name of the prop and the hand you're using. If I call the SwapHands() function, it pulls the new values from the other dictionary and then re-attaches the prop to the new hand.

One aspect I am considering but it might be beyond my skills, is instead of attaching the bag to the ped, I simply place it at that attach location but let it hang freely. The idea is that I create swinging motion based on the ped movement, so it doesn't look so rigid. I probably won't be able to code that, so it's a bonus if I ever manage it.

Next on the agenda... food, of which there seems to be very little based on the animations. So some creative attaching might have to happen there. I am also going to export the houses as OpenFormats and have a look at getting them into Max to build some interiors. I modelled most of the house I live in before we moved here, so I could plan colours and furniture locations... I enjoy architecture modelling, so it could be good fun.

Anyway, here's the video I just uploaded to YouTube for the shopping and umbrella activities. Emily has been my goto girl since I started doing these mods, which incidentally is just over 2 years since I did the first version of my OnFoot Cinematic Camera mod. But in return for all the walking I make her do, she gets a nice car and the ability to kill as many people as she likes, in the most painful way she can think of... seems a fair trade.

Update: Turns out there's more food than I thought, HotDog, Burger, Bagel, Sandwich and Donut. There's a couple that have a complete prop and then one with some missing, so I can make it buy the complete version, then after it has played an eating animation, I can switch to the one with a piece missing. Drinking seems to be confined to Coffee, Beer or eCola... I thought there might at least have been a Sprunk Can but it seems not. Might be time to start playing with Prop creation, see if I can add some variety as custom props.

One other thing I added was a wear SunGlasses activity but there's only one prop I can find at the moment and it's pretty crap at that. But it's one more thing that addon peds can't normally do unless they have been specifically added to the ped accessories. The more I can add, the more variety it will create and that's the ultimate aim of this mod.

Update: Brain-block day. I got the mod working with WGS last night and that works okay. I have a list of excluded location types, so if the nearest location is one of those types, it ignores it. That means I don't get two markers at locations handled by Car Services. But I need a dynamic interface that will present the items in an interesting way, that has my style, but retains a connection with the game. I am also thinking that you can buy items and store them, like food and drink but because they're perishable (have a limited lifespan), you can only store them for so long.

Basically, the crux of today is how to handle the inventory and item purchasing but I can't think clearly enough to do anything positive. I think I might add the binocular Activity later instead, it will work like the telescope, but with a different overlay and without all the animation-to-prop syncing. I already have a test mod for it, so it should be easy to add. These are the days where having more input would probably help but there you go, when you keep pressing the self-destruct button, there are going to be casualties.

On a slightly positive note (he says clutching at any straw in sight), I have now found plenty of drink props. I found a Sprunk can today (open and closed versions) and an Orang-O-tang can, to go with the eCola can I already had. I have a Coffee Cup and I am sure I saw a cup from Burger Shot... I think.

Update: And I now have Binoculars as an activity. I cursed myself by saying it would be easy to add, because it turned out that my test mod just drew the Scaleform overlay. Spent ages chasing a positioning bug, which was placing the camera in Emily's crotch, instead of in front of her head. Good job she's very understanding of my quirks. Now I just have to tidy everything up, because it ended up a whole collection of bodge routines to find the best solution... now I have to go back and make it an efficient solution as well. But that's another activity ticked off the list.

Update: Well I have spent all afternoon trying to detect the Ferris Whale and I can't. It doesn't appear to be an Object, Entity, Prop or Vehicle. Not quite sure what else I can try, the number of available options are zero.

Update: Finally got to grips with converting MP accessories into Props, so I now have access to a full set of glasses to wear. The downside is that addon peds, like addon vehicles, are subject to modder innacuracy. So I am going to have to add an "Accessory Adjustment" mode in, so that I can store offsets for accessory types. The other downside is that I can't have texture variations, so I have to pick the texture carefully, as I only get one. But it's another small addition, so it's not too bad.

Well I have 8 pairs of glasses for female peds converted now but there seems to be a lot more... not sure how long the novelty of converting these will last. It only takes a few minutes per pair, it's just repetetive. I am also getting p*ss*d off at Simple Trainer and my own Ped Spawner. I hate that big black box on Simple Trainer and how it hides everything on the screen... it makes customising peds almost impossible. So I thought I would check the glasses in my own spawner, Pick Your Ped and not only did I find a crash-bug, I also realised that I can't change glasses in there, because they're props and I don't handle props.

So the day has been running at borderline tolerable and then in the space of 5 minutes, it drops into the fracking pits like a stone. I have to confess, this extreme isolation I have been in since I "spilled the beans" so to speak, is gradually chipping away at my sanity... I sense another breakdown is imminent... just what I really don't need. Every step I take to protect other people from myself, exposes me to myself even more, damned if you do, damned if you don't.

Update: 4 more pair of glasses converted, so that's all the base MP Freemode pairs. Oddly, some of the eyes accessories don't seem to have any mesh content... not sure I understand what's going on there.

I tried to remove some collision to open up the garage in Banham Canyon, ended up opening a hole in the floor as well... I think I need to try that one again. I don't uderstand the collision though, there seems to be two sets and I am not sure what function each set serves.

Continued on Page 3