• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

using an array to copy and replace multiple symbols into a file

Participant ,
Sep 27, 2024 Sep 27, 2024

Copy link to clipboard

Copied

trying to make a drop down box tjhat would allow some assets to join for preservation of petpet park avatar assets. this game has 400 color bottles, tons of catagories of clothes and etc and wondering and looking in the file, i'm finding three strings of assets for them under array and one under dictionary

 

 

i was given a script before that allowed me to load ONE symbol, how would this array be used to make this script go back until all pieces are loaded. not sure if the post is still here so i put a image of it as well, this code part was not easy to get figured out either 🙂

 

 

 

terryw30405050_1-1727446060723.png

 

this is what i'm trying to make a drop down box so i can get the images to a flash preservation site and not have it just die in a folder to speak....

 

terryw30405050_2-1727446288567.png

i do know each clothing piece also has a x and y coodinate too, is their an easier way to copy this than having to put x=number and y=number for each piece.

 

so far this is what i've figured 

 

array is going to load 0, 0 loads say arm_1 to both wireframe and new piece, places the piece, goes back and then gets 1, which should be arm_4, repeats.

 

this is one of those pieces of code that i'm assuming someone put on  wall and framed beause its so elegent yet well, look at how much stuff it loads esp when you diagram out the thing. this game has the most clothes i've erer seen in a game too. i got a small 2mb file of stuff that took 2 weeks to sort out and supposedly a nightmare cache was saved of this too that well, is in the hundreds of mb but their not sharing it, there trying to do this in unity and so far have not been able to get any of them to work so i guess im doing good so far with 66 base models working.

 

how this was done originally, theres two other pages for both the color of the pet and the species....

i'm just trying to get a simple text dropdown for now and well, this art deserves to be preserved and well,

its not really practical to do it how i have loaded it so far.

 

terryw30405050_4-1727446756084.png

the user would drag the image onto the avatar and per video breakdowns it would then load each piece to the avatar and it would appear in the image there.

 

Views

902

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 05, 2024 Oct 05, 2024

Copy link to clipboard

Copied

lets seee what Can be handled in a forum? i'm looking in some as3 game coding books at this can't be the first place this has been used before....on the array and loading bit. so far checking here https://www.amazon.com/ActionScript-3-0-Game-Programming-University/dp/0789737027

 

noticing a pattern that can be applied here to cut this list down 99% too ... mabe we can start there?

 

the code looks to be using _loc2 to adapt a symbol here based on its need similar to the species url taking the

color and species to making a color bottle url.

front_+"loc2" +_1 to 11 to make a symbol name

 

example i select shirt and loc2 is shirt

front_shirt_1 is the output then ....goes to its numbers

example 2 select dress and loc2 is  "dress"

 

 

front_dress_1 is the output

(there would be a back obviously and a torso ....) so far i have not had this fail when looked at the symbol names.

 

the bracelet comes up with _loc2_ set to bracelet as....

front_bracelet_1 to etc

 

this does seem to LARGELY eliminate the tree of stuff to actually load as i do not need to actually make ALL the clothes apear at once time as the wireframe does, for this viewer all i really need it to do is get it to display a pet and a list of clothes that was saved. this is working example of what i'd like to get going...https://wardrobe.jellyneo.net/preview/?id=40945

 

 

 

this is also on every symbol in the library and piece..

 

id = "Front_head_Beard"; but not sure what its function is.

 

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 08, 2024 Oct 08, 2024

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 12, 2024 Oct 12, 2024

Copy link to clipboard

Copied

this seems to be solving a lot of the issue :

 

//test of loading arrays

var aspectA = ["front","back"];

var body_addl=["shirt_","jacket_","dress_","head,fx","glasses","collar","tattoo","wand","backpack","beard","biodrip","eyepatch","mask","bracelet","glove","torso_fx","shoe"]
var body_partA = ["arm_","leg_","Torso,""];

//"" nedd to clear this spot for accessories

var count_partA = ["1","4","5","6","7","8","9","10","11","12","",""];

var wherex = ["0","100","200","300"]

var wherey = ["0","100","200","300"]


trace ([aspectA[0]+"_"+body_partA[0]+body_addl[1]+count_partA[0]]);
trace ([wherex[0]+"_"+wherey[0]]);
trace ([aspectA[1]+"_"+body_partA[0]+count_partA[0]]);
trace ([wherex[2]+"_"+wherey[2]]);
trace ([aspectA[0]+"_"+body_partA[0]+count_partA[1]]);
trace ([wherex[3]+"_"+wherey[3]]);
trace ([aspectA[1]+"_"+body_partA[0]+count_partA[2]]);
trace ([aspectA[0]+"_"+body_partA[0]+count_partA[3]]);
trace ([aspectA[1]+"_"+body_partA[0]+count_partA[4]]);
trace ([aspectA[0]+"_"+body_partA[0]+count_partA[5]]);
trace ([aspectA[0]+"_"+body_partA[2]+count_partA[10]]);
trace ([aspectA[1]+"_"+body_partA[2]+count_partA[11]]);

 

going to frame thsi thing as thats the first piece of code i wrote that so far, is getting me closer to a cake....now just to get that into the loader you gave earlier  and i think i can buy one 🙂

the next step is going to be amking a switch and case script so when the user sets body are set to shirt i can put a specific array for that item . seems like i got a long way to go but sonsidering i've not done much as3 scripting, this is a horrendous way to introduce yourself to coding...most use hello world:)

terryw30405050_0-1728735207322.png

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 12, 2024 Oct 12, 2024

Copy link to clipboard

Copied

you're tracing strings, not objects.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 12, 2024 Oct 12, 2024

Copy link to clipboard

Copied

yes because i wanted to check the names coming out as thats what i need to pass TO  the loader to get out of the clothing swfs and i wanted to make sure the strings matched what the fas3 coding names were.

they didn't the first time actually, had "_" in places it should not be etc

 

the part thats going to be a nightmare is the x and y coordinates for each type of string aka shirts and pants as they from previous tests need to be exactly where they are expected when stuffed into the wirefame or we get some modern art out of a doctors office, i think im going to solve that using the strings to look at a switch and case script

so when it sees its laoding a shirt, it can use that array to put them in the right place on the wireframe, its really quite important to do unless you know of a better way to put that to the addchild command, 

 

the fact this thing is making accurate strings with 2 inputs is good at the moment as its the first time i've eeen this thing actually get close to a coded example of a viewer .

 

eventually will need to be a variable for e each clothing object anyways to give it a starting species and some kidna clothing you could change as a viewer.

whoever did this really enjoyed clothing as most games like this its pants, shirt and shoes and mabe some headwear, rarelyseen  stuff stacked like this. the jacket, shirt, and dress come into mind as a good portion of the time their nothing left to see of the base layer at all.

 

 

 

 

 

 

 

once it has those and a filename, it should pass nicely to a loader.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 13, 2024 Oct 13, 2024

Copy link to clipboard

Copied

LATEST

attempt two at this, this one is looking very promising.....


//test of loading arrays
//this string is to tell it what item to make
var C = 0
//this string sets now many times the script runs
var A = 22
//this string sets the view of the pets clothes count_partA[C]eing made
//sets the count_partA[C]ody_part_a loaders item
var setitem = 8
//use item 20 here to not have second part on symbols
var setitem2=20
//sets the count_partA[C]ody_addl loaders item
var limb = ["arm","leg","Torso","_shirt","_jacket","_dress","head,fx","glasses","collar","tattoo","wand","backpack","beard","biodrip","eyepatch","mask","bracelet","glove","torso_fx","shoe",""];
var static = ["front","rear"];
var multi_test = [ static[0]+"_"+limb[setitem]+limb[setitem2]+"_1",static[0]+"_"+limb[setitem]+limb[setitem2]+"_4",static[0]+"_"+limb[setitem]+limb[setitem2]+"_5",static[0]+"_"+limb[setitem]+limb[setitem2]+"_6",static[0]+"_"+limb[setitem]+limb[setitem2]+"_7",static[0]+"_"+limb[setitem]+limb[setitem2]+"_8,",static[0]+"_"+limb[setitem]+limb[setitem2]+"_9",static[0]+"_"+limb[setitem]+limb[setitem2]+"_10",static[0]+"_"+limb[setitem]+limb[setitem2]+"_11",static[0]+"_"+limb[setitem]+limb[setitem2]+"_12",static[0]+"_"+limb[2]+limb[setitem2],static[1]+"_"+limb[setitem]+limb[setitem2]+"_1",static[1]+"_"+limb[setitem]+limb[setitem2]+"_4",static[1]+"_"+limb[setitem]+limb[setitem2]+"_5",static[1]+"_"+limb[setitem]+limb[setitem2]+"_6",static[1]+"_"+limb[setitem]+limb[setitem2]+"_7",static[1]+"_"+limb[setitem]+limb[setitem2]+"_8,",static[1]+"_"+limb[setitem]+limb[setitem2]+"_9",static[1]+"_"+limb[setitem]+limb[setitem2]+"_10",static[1]+"_"+limb[setitem]+limb[setitem2]+"_11",static[1]+"_"+limb[setitem]+limb[setitem2]+"_12",static[1]+"_"+limb[2]+limb[setitem2]];{
for (var i: Number = 0 ; i < A ; i++){
trace(multi_test[i]);;
}
}

results so far

terryw30405050_0-1728855588887.png

any clue on how to make that array not so messy, i tried getting the i to allow me to do that as its on the bottom of the script  also tried setting a variable at the top to zero and one at the bottom to kick it forwards....i see why people hate to learn programming!!

this is one crazy introduction to it and well, it looks to be making the lists this way, even if it looks awful on screen in code. use the option "setoption1" and "setoption2" and what im seeing ie VERY exciting if i can feed this nightmare into a loading script. note option 20 is set for all but "dress" "jacjet; and a few items that are front_arm_jacket_1, etc

 

*laughs* likely going to frame this thing once its loading files as well, its been like the thing to solve about turning this games might as well lost assets into found assets, becauuse i think 2 groups and mabe a few here would of been able to see the art. the adjustable counter is needed as many items have only a front and back and it seemed easier on a dropdown to not have more than one loader.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines