Jump to content

weapon ring (release)


Demarest

Recommended Posts

This was a necessary step in the project I'm working on. So rather than use it and lose it, I figure I'd put it out there. Others might learn from it while some might actually want it in their game. Highly Darkpactable without the use of a create_thread even. All it does is generate a ring of every weapons pickup in the game. It's written to be customizeable, so you can specify where to place it, how large it should be, etc. As it's written, the ring will be flat. I could've added a ground_z check, but it was only meant to be legwork for my current project. Here's the code

:WEAPONRING0007: @0 =  2490.5 ;CENTER X0007: @1 = -1669.2 ;CENTER Y0007: @2 =  13.0   ;Z OF ALL PICKUPS0007: @3 =  14.5   ;RADIUS0007: @4 =  360.00017: @4 /=  43.0  ;QUANTITY OF PICKUPS (FLOAT)0006: @5 =  320    ;WEAPON START ID MINUS 10007: @6 =  0.00063: @6 -= @4:WEAPONRING2000A: @5 +=  100D6: if  00019:   @5 >  371004D: jump_if_false ££WEAPONRING3004E: end_thread:WEAPONRING300D6: if  48039:    NOT  @5 ==  3278039:    NOT  @5 ==  3288039:    NOT  @5 ==  3298039:    NOT  @5 ==  3308039:    NOT  @5 ==  332004D: jump_if_false ££WEAPONRING200D6: if  48039:    NOT  @5 ==  3408039:    NOT  @5 ==  3458039:    NOT  @5 ==  3408039:    NOT  @5 ==  3548039:    NOT  @5 ==  370004D: jump_if_false ££WEAPONRING2005B: @6 += @402F6: @7 = cosine @602F7: @8 = sinus @60013: @8 *= -1.0006B: @7 *= @3006B: @8 *= @30087: @9 = @00087: @10 = @1005B: @9 += @7005B: @10 += @80213: @11 = create_pickup @5 type  15 at @9 @10 @20002: jump ££WEAPONRING2

Most of it is pretty self explanatory. If there's weapons you'd like to omit, open /data/weapon.dat in Notepad, find the weapon's corresponding ID number and add an if @5 NOT = X line, taking care to stay within conditional guidelines of no more than 8 conditionals per if check. If you do add if @5 NOT = X lines, don't forget to lower the quantity divisor by 1. The amount of such NOT line added to the quantity divisor should always equal 53. So in the example code here, the divisor is 43 and there are 10 NOT lines. 53. Make sure you keep the divisor as a float (43.0 instead of 43).

 

Nothing special. Just if I publish it, I won't ever have to rework the routine out should I ever have the desire. This WILL add as many pickups to the total pool as the divisor is set for. Any side effects of surpassing the pickups limit or MAIN section capacity is up to the author. Those who use it in a Darkpactor without a create_thread will need to remember to adjust the jumps to local ones (£ instead of ££).

 

These instructions aren't meant to insult anybody, but instead make it as useable to as many people as possible. So I should mention to not forget the create_thread. New users will also note the complete lack of waits. In a stripped SCM it takes < 40 milliseconds to fully execute, so NOT a big deal at all wink.gif

 

[EDIT]

Almost forgot...

 

user posted image

Edited by Demarest
Link to comment
Share on other sites

  • 2 months later...

That is friggin' pimp.

However, I'm a dumbass, so I'm a bit lost.

 

Do I just drag and drop this code in my Main.scm?

You mentioned some Darkpactor program, do I need that?

Link to comment
Share on other sites

That is friggin' pimp.

However, I'm a dumbass, so I'm a bit lost.

 

Do I just drag and drop this code in my Main.scm?

You mentioned some Darkpactor program, do I need that?

Ah dude, you just bumped a 2 1/2 month old topic. Be more careful next time.

Link to comment
Share on other sites

 

That is friggin' pimp.

However, I'm a dumbass, so I'm a bit lost.

 

Do I just drag and drop this code in my Main.scm?

You mentioned some Darkpactor program, do I need that?

Ah dude, you just bumped a 2 1/2 month old topic. Be more careful next time.

Hey, how about leaving your spamarific posts in Gen Chat, mmkay? It's pretty clear to me he asking how to implement this code into his own scm. Since Dem posted the topic and the code in Mission Coding and not the Mod Showroom, it would seem that it's open for discussion regardless of the time between posts.

 

Because that's how we roll, yo.

 

@Dante: Have you ever coded for GTA before? Do you have the right tools? This isn't a difficult code to use, but it won't make sense if you don't know what it all means.

 

Darkpact is a piece of code Dem developed to allow mission scripters to include save-game compatiblity. When you mod a mission script normally, you have to start a new game. With Dem's code, save games are allowed as well. Be aware that Darkpact IS pretty advanced code, and IIRC, needs the old dma-mission builder to compile properly (Barton's MB 0.22, I believe).

 

If you're new to coding, you may want to start out smaller have a look at some of the tutorials in the Tutorials Forum.

 

Good luck! smile.gif

Link to comment
Share on other sites

Just thought I better point out, Demarest has left GTAForums and the GTA Community for good, so there won't be any 'official" support as such for this mod (to my knowledge anyway). So yeah, the best we can do is help you such as how ceedj has. If I can get the permission from Demarest, I might make this a full modification so it won't require manual editing. But we'll see.

 

@-/TNT\- - You do do a lot of 1 liners, and useless posts, so I'm afraid I am going to have to agree with ceedj at this point in time. Bumping topics works this way, you bump in when, and only when, your question or comment is important, if it isn't it is not allowed. Considering how quiet the modding scene is, I don't think anyone is worried either way.

user posted image
Link to comment
Share on other sites

Just thought I better point out, Demarest has left GTAForums and the GTA Community for good

Not officially, although that's the way it's heading methinks.

 

At the very least, don't expect any help from him in the near future wink.gif.

Link to comment
Share on other sites

Just thought I better point out, Demarest has left GTAForums and the GTA Community for good

Not officially, although that's the way it's heading methinks.

 

At the very least, don't expect any help from him in the near future wink.gif.

Well yes, it's not official, but from the way it sounded on AIM, it is. So yeah, best not to expect anything (support or releases).

user posted image
Link to comment
Share on other sites

  • 4 months later...

 

BUMP !!!

 

I can't belive such a good topic has been dead so long, but I have a question about it so instead of creating a new topic I'll ask it here.

Anyway.

@Demarest is it possible to make the ring appear after a certain mission?

It will be some kind of a reward for the mission.

Link to comment
Share on other sites

Indeed. That is just the smallest of threads. Where you put and when you choose to call upon it is entirely up to you! Keep in mind that there IS a limit as to how many pickups can exist in the game total. Should you overflow that, I'm not sure WHAT would happen. IIRC, I've done this before and GTA3 and VC. Nothing crashed, just the last X pickups didn't show up where X was the amount of pickups I went over the limit.
Link to comment
Share on other sites

  • 1 month later...

When you save the game it stores 620 item pickups. These include oysters, horseshoes, snapshots, ect, as well as all the weapon pickups. Some of these are free slots and do not appear in the game (ie: oysters that have been collected and not garbaged yet).

 

I don't think the game will save more than 620 objects, but it might be able to cope whilst running?!?

Link to comment
Share on other sites

The initial post already addresses that it makes no promises to be able to defeat SA's pickup limit. If you're asking if you can surpass the limit, I'm guessing no. You couldn't in GTA3 and VC and if it only saves the 620 limit, then it wouldn't make room for more in the game. Don't forget too that the save file is a memory dump. So if only provides for 620 in the save, it only provides for that many in the game as well.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.