New Item not displaying properly in-game - mysql

I've created my first weapon (item ID: 90000 | display ID: 42070) using Keira. I restarted the DB and clear the cache on the client. I spawned the weapon onto my character, but I get a question mark in the inventory. When I equip the weapon and the character is attacking I can see the weapon , but when it is sheath I can't see the weapon.
I've looked at several conversations that speak about patching the client, but its way over my current pay grade. I need to learn how to do this if I want to continue to create content. Where can I go to learn the skills that I am missing? or who can teach me how to fish so that I can fish for myself? Please advise...
~ tinywolf

You can do a workaround on this by changing a weapon that is already in the game in Keira3
Unless u have created a completely new model u maybe just wanna change another that already has the look

Related

How to convert string to json and vice versa in flutter?

Hi below is the json that I need to extract data from.
[
"http://activepeersai.computing.dcu.ie/feedback_participant/114",
"http://activepeersai.computing.dcu.ie/peerLearningPrompter/4",
"{\"0\":{\"feedback_id\":114,\"timer_used\":1,\"timer\":10.0,\"question1\":\"How to break ice with strangers (in social gathering & in formal events) ?\",\"question2\":\"How to build networking (with those from different age, culture, education background, language\\u2026)(in university & in workplace) ?\",\"question3\":\"\",\"question4\":\"\",\"question5\":\"\",\"question6\":\"\",\"question7\":\"\",\"question8\":\"\",\"question9\":\"\",\"question10\":\"\"},\"1\":{\"feedback_id\":115,\"timer_used\":1,\"timer\":10.0,\"question1\":\"How to deal with difficult teammates (dominating \\/ debater character \\/ negative \\/ lack of confidence \\/ free rider\\u2026) ?\",\"question2\":\"How to build mutual trust with teammates ?\",\"question3\":\"\",\"question4\":\"\",\"question5\":\"\",\"question6\":\"\",\"question7\":\"\",\"question8\":\"\",\"question9\":\"\",\"question10\":\"\"}}",
"{\"id\":{\"0\":1,\"1\":2,\"2\":3,\"3\":4,\"4\":5,\"5\":6,\"6\":7,\"7\":8,\"8\":9,\"9\":10,\"10\":11,\"11\":12,\"12\":13,\"13\":14,\"14\":15,\"15\":16,\"16\":17,\"17\":18,\"18\":19,\"19\":20,\"20\":21,\"21\":22,\"22\":23,\"23\":24,\"24\":25,\"25\":26,\"26\":27,\"27\":28,\"28\":29,\"29\":30,\"30\":31,\"31\":32,\"32\":33,\"33\":34,\"34\":35,\"35\":40,\"36\":41,\"37\":42,\"38\":43,\"39\":44,\"40\":45,\"41\":46,\"42\":47,\"43\":48,\"44\":49,\"45\":50,\"46\":51,\"47\":52,\"48\":53,\"49\":54,\"50\":55,\"51\":56,\"52\":57,\"53\":58,\"54\":59,\"55\":60,\"56\":61,\"57\":62,\"58\":63,\"59\":36,\"60\":37,\"61\":38,\"62\":39},\"name\":{\"0\":\"Why did the sharer choose this skill as the most confident skill and why did the learner wants to improve this skill?\",\"1\":\"Can you share another situation whereby using this skill made a very big difference to the outcome? What did you do? What was the result? What might have happened if this skill wasn't brought to the situation?\",\"2\":\"What advice do you have to give to others about becoming better at using this skill in their work and in their lives generally?\",\"3\":\"What can hold people back from being better at this skill? How can you encourage them to overcome these challenges?\",\"4\":\"What would be the outcome if this session\\/series was a huge success? How would we know if this happened?\",\"5\":\"What is working for you now? What is stopping you from moving forward?\",\"6\":\"What do your role models do that you would love to learn\\/incorporate as habits\\/adopt as a mindset?\",\"7\":\"\\\"What got you here won't get you there.\\\" What is your reaction to that statement? What actions have got you to this point that may not serve you if you move forward? What new behaviours do you need to adopt?\",\"8\":\"What would be the outcome if this session\\/series was a huge success? How would we know if this happened?\",\"9\":\"If you had all the time, people, money, resources that you might possibly need, what would you do differently? Does that energise you, frighten you or a bit of both?\",\"10\":\"What do you think you need to do get a better result (or closer to your goal)?\",\"11\":\"What is the worst that could happen and how could you handle it? What is the best that could happen and how could you handle it?\",\"12\":\"What have been the most impactful decisions that you've made in your career? What led to making those decisions? Were you aware of the impact those decisions would have? What would you say to others in a similar position?\",\"13\":\"What habits have stood you in good stead? Are there things that you do regularly, daily or very often that have made a big different over time?\",\"14\":\"Can you share an experience that was transformational for you, taught you a long-lasting lesson or was particularly memorable for its benefits and challenges?\",\"15\":\"How do you think experience affects somebody's perspective, way of making decisions or their feelings about taking risks?\",\"16\":\"Can you describe your target market for your business or who might your ideal employer be?\",\"17\":\"Can you share details of a project that you worked on recently? Why were you or your business chosen to work with this client\\/employer? What were the success and challenges along the way?\",\"18\":\"What makes you\\/your product\\/your service different to others? Why would a client or employer choose what you do over others?\",\"19\":\"What might I be able to do to help you?\",\"20\":\"What is the key problem that you are facing currently?\",\"21\":\"If that problem was solved, what impact would it have?\",\"22\":\"In order to get to that outcome, what do we need to do, what resources need to be invested and any other changes to be made?\",\"23\":\"Is there a willingness to take that action to get towards that outcome?\",\"24\":\"What assumptions are being made? How likely are each one to happen? What would be the impact of those assumptions happening or not happening?\",\"25\":\"What application of the SCAMPER technique could be useful to help get another perspective?\\n*SCAMPER is an acronym formed from the abbreviation of: Substitute, Combine, Adapt, Modify (Also magnify and minify), Put to another use, Eliminate and Reverse.\",\"26\":\"If we had double the budget, half the time and were living in another country trying to make this happen, how might we think differently?\",\"27\":\"If any idea generated already in this discussion was to become a reality, what would be the impact on e year later in terms of benefits, ongoing coasts, sustained behavioural change and a launchpad for further growth?\",\"28\":\"Leadership\",\"29\":\"Communication\",\"30\":\"Adaptability\",\"31\":\"Team Work\",\"32\":\"Problem Solving\",\"33\":\"Conflict Management\",\"34\":\"Productivity\",\"35\":\"How would you describe good\\/effective communication? Please share an example of a time that you've seen it in action and an example of when you saw that good communication skills were clearly lacking.\",\"36\":\"How have you handled working under someone you felt was not good at communicating?\",\"37\":\"If you're trying to get your point across or convince somebody that your idea is the right one, what do you do?\",\"38\":\"Who do you think is a good communicator and why? What can we learn from them?\",\"39\":\"Talk about a time that you needed to adapt to a new situation. What did you find difficult and how did you work through that? How can somebody prepare to be more adaptable in future situations?\",\"40\":\"When you're in a situation where it feels like you have no control over it (i.e. a new manager, starting in a new job, government-led changes etc), what do you do to focus on what you can do?\",\"41\":\"How do you handle having multiple priorities at the same time?\",\"42\":\"How do you adjust to different work settings? For example, working with different teams, switching between logic and creativity, learning new processes, tools or technologies?\",\"43\":\"How do you feel about working in a team? What do you think are the key things that need to happen to make good teamwork?\",\"44\":\"What has been your experience of working in teams where there were problems? Did these arise due to strong personalities, somebody not sharing the workload, miscommunication, the wrong support or technology systems etc?\",\"45\":\"How do you keep a team motivated? Share your story about a rewarding team experience.\",\"46\":\"When you're in a team situation, what role do you usually play?\",\"47\":\"Describe a situation where you had to solve a problem. What did you do? what was the result? What might you have done differently?\",\"48\":\"What steps do you take before making a decision on how to solve a problem, and why?\",\"49\":\"Give an example of a situation in which you saw an opportunity in a potential problem. What did you do? What was the outcome?\",\"50\":\"Can you tell me about a situation where you overcame a problem using a creative solution?\",\"51\":\"Have you ever had a team member who kept raising objections on projects? How did you (or would you) manage them?\",\"52\":\"You have noticed that a team member is aggressive or arrogant toward the rest of the team. How would you approach this person?\",\"53\":\"What would you do if your manager gave you negative feedback on the way you approached a problem? How do give negative\\/constructive feedback to others?\",\"54\":\"How could you use a situation with conflict to have a better relationship with all involved?\",\"55\":\"How would you describe a typical working day in your current role? How you manage importance versus urgency? How do you maintain a work-life balance also?\",\"56\":\"If you have your day planned out to achieve a goal, how do you manage distractions or other things that can happen along the way?\",\"57\":\"What do you think very productive people do differently than others?\",\"58\":\"What holds people back from being more productive? How can people turn those around so that by doing the opposite, they can become more productive?\",\"59\":\"Have you ever had a team member who kept raising objections on projects? How did you (or would you) manage them?\",\"60\":\"How do you describe your leadership style?\",\"61\":\"What was a difficult decision you had to make as a leader, and how did you come to that decision?\",\"62\":\"What are the most important attributes of successful leaders today? Who do you think is a good leader and why?\"},\"session_type_id\":{\"0\":1.0,\"1\":1.0,\"2\":1.0,\"3\":1.0,\"4\":2.0,\"5\":2.0,\"6\":2.0,\"7\":2.0,\"8\":3.0,\"9\":3.0,\"10\":3.0,\"11\":3.0,\"12\":4.0,\"13\":4.0,\"14\":4.0,\"15\":4.0,\"16\":5.0,\"17\":5.0,\"18\":5.0,\"19\":5.0,\"20\":6.0,\"21\":6.0,\"22\":6.0,\"23\":6.0,\"24\":7.0,\"25\":7.0,\"26\":7.0,\"27\":7.0,\"28\":8.0,\"29\":8.0,\"30\":8.0,\"31\":8.0,\"32\":8.0,\"33\":8.0,\"34\":8.0,\"35\":null,\"36\":null,\"37\":null,\"38\":null,\"39\":null,\"40\":null,\"41\":null,\"42\":null,\"43\":null,\"44\":null,\"45\":null,\"46\":null,\"47\":null,\"48\":null,\"49\":null,\"50\":null,\"51\":null,\"52\":null,\"53\":null,\"54\":null,\"55\":null,\"56\":null,\"57\":null,\"58\":null,\"59\":null,\"60\":null,\"61\":null,\"62\":null},\"session_type_name\":{\"0\":\"Learning and Development\",\"1\":\"Learning and Development\",\"2\":\"Learning and Development\",\"3\":\"Learning and Development\",\"4\":\"Mentoring\",\"5\":\"Mentoring\",\"6\":\"Mentoring\",\"7\":\"Mentoring\",\"8\":\"Coaching\",\"9\":\"Coaching\",\"10\":\"Coaching\",\"11\":\"Coaching\",\"12\":\"Experience Sharing\",\"13\":\"Experience Sharing\",\"14\":\"Experience Sharing\",\"15\":\"Experience Sharing\",\"16\":\"Networking\",\"17\":\"Networking\",\"18\":\"Networking\",\"19\":\"Networking\",\"20\":\"Establishing Buy-In\",\"21\":\"Establishing Buy-In\",\"22\":\"Establishing Buy-In\",\"23\":\"Establishing Buy-In\",\"24\":\"Idea Exploration\",\"25\":\"Idea Exploration\",\"26\":\"Idea Exploration\",\"27\":\"Idea Exploration\",\"28\":\"Seven Soft Skills\",\"29\":\"Seven Soft Skills\",\"30\":\"Seven Soft Skills\",\"31\":\"Seven Soft Skills\",\"32\":\"Seven Soft Skills\",\"33\":\"Seven Soft Skills\",\"34\":\"Seven Soft Skills\",\"35\":null,\"36\":null,\"37\":null,\"38\":null,\"39\":null,\"40\":null,\"41\":null,\"42\":null,\"43\":null,\"44\":null,\"45\":null,\"46\":null,\"47\":null,\"48\":null,\"49\":null,\"50\":null,\"51\":null,\"52\":null,\"53\":null,\"54\":null,\"55\":null,\"56\":null,\"57\":null,\"58\":null,\"59\":null,\"60\":null,\"61\":null,\"62\":null},\"parent_id\":{\"0\":null,\"1\":null,\"2\":null,\"3\":null,\"4\":null,\"5\":null,\"6\":null,\"7\":null,\"8\":null,\"9\":null,\"10\":null,\"11\":null,\"12\":null,\"13\":null,\"14\":null,\"15\":null,\"16\":null,\"17\":null,\"18\":null,\"19\":null,\"20\":null,\"21\":null,\"22\":null,\"23\":null,\"24\":null,\"25\":null,\"26\":null,\"27\":null,\"28\":null,\"29\":null,\"30\":null,\"31\":null,\"32\":null,\"33\":null,\"34\":null,\"35\":30.0,\"36\":30.0,\"37\":30.0,\"38\":30.0,\"39\":31.0,\"40\":31.0,\"41\":31.0,\"42\":31.0,\"43\":32.0,\"44\":32.0,\"45\":32.0,\"46\":32.0,\"47\":33.0,\"48\":33.0,\"49\":33.0,\"50\":33.0,\"51\":34.0,\"52\":34.0,\"53\":34.0,\"54\":34.0,\"55\":35.0,\"56\":35.0,\"57\":35.0,\"58\":35.0,\"59\":29.0,\"60\":29.0,\"61\":29.0,\"62\":29.0}}"
]
I need to extract data from the 3rd line.
The below code tries to extract the first set of questions from the 3rd line.
import 'dart:core';
import 'dart:convert';
import 'package:http/http.dart' as http;
class Question {
late final String question;
Question({ required this.question});
}
void getData() async{
List<Question> sample_data = [];
String link = 'https://activepeersai.computing.dcu.ie/API/631';
var url = Uri.parse(link);
var result = await http
.get(url,headers: {"Accept": "application/json","Access-Control_Allow_Origin": "*"});
if(result.statusCode==200){
var data = jsonDecode(result.body);
var res = jsonDecode(data[2]);
String round1 = json.encode(res);
var data1 = jsonDecode(round1);
var questions = jsonDecode(data1[0]);
for(var k in questions.keys){
if(((k=='question1')|| (k=='question2') || (k=='question3') || (k=='question4') || (k=='question5') || (k=='question6') || (k=='question7') || (k=='question8') || (k=='question9') || (k=='question10'))){
Question question = Question(question: res[k]);
sample_data.add(question);
}
}
print('$sample_data');
}
}
void main() {
getData();
}
Now when I print round1 I get the below output.
{"0":{"feedback_id":114,"timer_used":1,"timer":10,"question1":"How to break ice with strangers (in social gathering & in formal events) ?","question2":"How to build networking (with those from different age, culture, education background, language…)(in university & in workplace) ?","question3":"","question4":"","question5":"","question6":"","question7":"","question8":"","question9":"","question10":""},"1":{"feedback_id":115,"timer_used":1,"timer":10,"question1":"How to deal with difficult teammates (dominating / debater character / negative / lack of confidence / free rider…) ?","question2":"How to build mutual trust with teammates ?","question3":"","question4":"","question5":"","question6":"","question7":"","question8":"","question9":"","question10":""}}
Which when I checked on Json Checker came to be valid.
But after this I get an error.
Error: Expected a value of type 'String', but got one of type 'Null'
at Object.throw_ [as throw] (http://localhost:56003/dart_sdk.js:5080:11)
at Object.castError (http://localhost:56003/dart_sdk.js:5039:15)
at Object.cast [as as] (http://localhost:56003/dart_sdk.js:5356:17)
at String.as (http://localhost:56003/dart_sdk.js:46240:19)
at getData (http://localhost:56003/packages/testing_for_data/main.dart.lib.js:74:56)
at getData.next (<anonymous>)
at http://localhost:56003/dart_sdk.js:40641:33
at _RootZone.runUnary (http://localhost:56003/dart_sdk.js:40511:59)
at _FutureListener.thenAwait.handleValue (http://localhost:56003/dart_sdk.js:35438:29)
at handleValueCallback (http://localhost:56003/dart_sdk.js:35999:49)
at _Future._propagateToListeners (http://localhost:56003/dart_sdk.js:36037:17)
at [_completeWithValue] (http://localhost:56003/dart_sdk.js:35872:23)
at async._AsyncCallbackEntry.new.callback (http://localhost:56003/dart_sdk.js:35906:35)
at Object._microtaskLoop (http://localhost:56003/dart_sdk.js:40778:13)
at _startMicrotaskLoop (http://localhost:56003/dart_sdk.js:40784:13)
at http://localhost:56003/dart_sdk.js:36261:9
Can someone tell me what I am doing wrong?
Its coming due to the line
var data1 = jsonDecode(round1);
I believe this line is wrong
var questions = jsonDecode(data1[0]);
Firstly, because you probably need data1['0'] instead of data1[0]. They key is a string, not a number.
Secondly. You don't need to decode it again. It's already decoded. So try
var questions = data1['0'];
The next thing is that
Question question = Question(question: res[k]);
needs to be changed to
Question question = Question(question: questions[k]);
Because you actually want it from the questions.
If you want it to print the question instead of Instance of 'Question' you can add a toString method to it, for example:
class Question {
late final String question;
Question({ required this.question});
#override
String toString() {
return question;
}
}

Editing a Virtual Arsenal in Arma 3 with SQF

not sure if I can ask a question like this on Stack Over flow but basically in Arma 3 im currently editing a scenario called Antistasi, I want to remove some weapons from the virtual arsenal, i've got the variable name, but I have tried all the following and it is not removing the desired item.
[ caja, ["arifle_MXM_F"], true ] call BIS_fnc_removeVirtualItemCargo;
[ caja, ["arifle_MXM_F"], true ] call BIS_fnc_removeVirtualWeaponCargo;
Some help would be appreciated
Edit - It defiantly is the correct Variable as I can move it around with the same name.
You don’t say how you created the arsenal. I always favour scripting so the following will create a virtual arsenal with all weapons in a weapon crate named CRATE_1:
["AmmoboxInit", [CRATE_1, true]] call BIS_fnc_arsenal;
If you want to put this code in the ‘Object:Init’ field of the crate in the Eden editor then you need to use:
noUse = ["AmmoboxInit", [this, true]] call BIS_fnc_arsenal;
noUse is unimportant but a variable is required.
However if you do that the BIS_fnc_removeVirtualWeaponCargo function to remove weapons does not work. I believe there is a bug when you create a virtual weapon crate with all weapons. I get a half hidden error message when I open the arsenal "BIS_fnc_baseWeapon Class '%All' not found in CfgWeapons".
You can create an empty arsenal and add weapons to it. Those can be removed but I am guessing that is not what you want to do. The following code works:
["AmmoboxInit", [CRATE_1, false]] call BIS_fnc_arsenal;
[ CRATE_1, ["SMG_03_black", "arifle_MX_GL_F"], true ] call BIS_fnc_addVirtualWeaponCargo;
[ CRATE_1, ["SMG_03_black"], true ] call BIS_fnc_removeVirtualWeaponCargo;
I favour creating empty virtual arsenals and specifying the equipment I want in the arsenal. Bear in mind there are 4 functions for adding items to a virtual arsenal:
BIS_fnc_addVirtualWeaponCargo;
BIS_fnc_addVirtualMagazineCargo;
BIS_fnc_addVirtualItemCargo;
BIS_fnc_addVirtualBackpackCargo;
I offer a final warning if you are trying to limit weapons usable by players. The virtual arsenal will always show a weapon or equipment a player currently has on his character. In addition a player can load a loadout they previously saved that may have weapons and equipment you do not want them to have.

Cannot retrieve field from a JSON object return by amazon-product-api

Hello every body I am new node.js I have this code `
client.itemSearch({
keywords:'borderlands 2' ,
searchIndex: 'VideoGames',
responseGroup: 'ItemAttributes,Images'
}).then(function(results){
res.end(JSON.stringify(results[0].ItemAttributes));
var kson = JSON.parse(JSON.stringify(results[0].ItemAttributes));
console.log(JSON.stringify(kson['Title']));
}).catch(function(err){
console.log(err);
});`
The json result of the amazon search is this [{"Binding":["Video Game"],"Brand":["2K"],"CatalogNumberList":[{"CatalogNumberListElement":["49101"]}],"Creator":[{"_":"Take 2","$":{"Role":"Creator"}}],"Department":["Video Games"],"EAN":["0163120331895"],"EANList":[{"EANListElement":["0163120331895","0151903126141","0031111574449","0088021472273","0021113169989","0100177413464","7104254910160","0710425491016","0745449851300"]}],"Edition":["Standard"],"ESRBAgeRating":["Mature"],"Feature":["Dynamic Co-op online, split-screen and LAN: Share your adventures with friends both online and via LAN. Borderlands 2 features a seamless system enabling you to drop in and drop out of a campaign without ever having to restart the game.","World Connected Story: You will find yourself left for dead in the frozen tundra of Pandora as you begin your quest of revenge and redemption.","New Badass Gun System: An entirely new take on the groundbreaking procedural system means millions upon millions of possible weapons. The variety and style of guns in Borderlands 2 is staggering.","87 Bazillion Everything: In addition to the new gun system, you will lust after procedurally generated shields, grenades, Alien Artifacts, class mods and much, much more. And you thought the original Borderlands had a ton of loot!","Brand new environments on Pandora: Hunt through entirely brand new areas of Pandora that are more alive than ever!","Choose from all new characters and classes including the Gunzerker, who can dual-wield any two weapons in the game","Share your adventures with friends both online and via LAN with a seamless co-op system enabling you to drop in and drop out of a campaign without ever having to restart the game","Improved story integration which finds you left for dead in the frozen tundra of Pandora as you begin your quest of revenge and redemption","An entirely new take on the groundbreaking procedural system means millions upon millions of possible weapons","In addition to the new gun system, players lust after procedurally generated shields, grenades, alien artifacts, class mods and much, much more"],"Genre":["shooter-action-game-genre"],"HardwarePlatform":["Xbox 360"],"IsAdultProduct":["0"],"IsAutographed":["0"],"IsEligibleForTradeIn":["1"],"IsMemorabilia":["0"],"ItemDimensions":[{"Height":[{"_":"752","$":{"Units":"hundredths-inches"}}],"Length":[{"_":"531","$":{"Units":"hundredths-inches"}}],"Weight":[{"_":"19","$":{"Units":"hundredths-pounds"}}],"Width":[{"_":"51","$":{"Units":"hundredths-inches"}}]}],"ItemPartNumber":["710425491016"],"Label":["2K"],"Languages":[{"Language":[{"Name":["English"],"Type":["Published"]},{"Name":["English"],"Type":["Original Language"]},{"Name":["English"],"Type":["Unknown"]}]}],"ListPrice":[{"Amount":["1999"],"CurrencyCode":["USD"],"FormattedPrice":["$19.99"]}],"Manufacturer":["2K"],"ManufacturerMinimumAge":[{"_":"96","$":{"Units":"months"}}],"Model":["49101"],"MPN":["49101"],"NumberOfItems":["1"],"OperatingSystem":["Xbox 360"],"PackageDimensions":[{"Height":[{"_":"50","$":{"Units":"hundredths-inches"}}],"Length":[{"_":"750","$":{"Units":"hundredths-inches"}}],"Weight":[{"_":"20","$":{"Units":"hundredths-pounds"}}],"Width":[{"_":"530","$":{"Units":"hundredths-inches"}}]}],"PackageQuantity":["1"],"PartNumber":["49101"],"Platform":["Xbox 360"],"ProductGroup":["Video Games"],"ProductTypeName":["CONSOLE_VIDEO_GAMES"],"PublicationDate":["2012-09-18"],"Publisher":["2K"],"RegionCode":["36222"],"ReleaseDate":["2012-09-18"],"Studio":["2K"],"Title":["Borderlands 2 - Xbox 360"],"TradeInValue":[{"Amount":["86"],"CurrencyCode":["USD"],"FormattedPrice":["$0.86"]}],"UPC":["021113169989"],"UPCList":[{"UPCListElement":["021113169989","100177413464","031111574449","163120331895","088021472273","745449851300","151903126141","710425491016"]}]}]
I can not find a way to retrieve the field title from the results!
Try this:
client.itemSearch({
keywords:'borderlands 2' ,
searchIndex: 'VideoGames',
responseGroup: 'ItemAttributes,Images'
}, function(err, results, response) {
if (err) {
console.log(err);
} else {
var amazon_product = JSON.parse(results[0].ItemAttributes);
console.log(amazon_product.Title);
}
});
I hope it helps :)

How to remember a room has been cleared? AS3,FP

I have am new to AS3 and coding in general so this is why I am asking this question. I am trying to make a like semi-proceduraly generated dungeon crawler sort of thing like binding of isaac using flashbuilder and flashpunk.
but this has left me with a problem; I have figured out two ways to do the rooms. Either I can spawn all the rooms at once and have the players move between them using a door entity to block progress or I can load a new world that contains the room inside it and nothing else using FP.world = new world. But this gives me two problems so basically this is the main thing I want to know.
I want the world to remember what was in it and what was killed even if I enter a new world. E.g. right now if I enter a new world it will load that world up fresh and then if I kill all the enemies and leave and then re enter it will just spawn all the enemies again. I need to know how to get that room to remember it has been cleared of enemies.
Is there anyway to do this?
I'm not familiar with FP, so I cannot tell if FP allows to save room states. You better check the documentation, but if it doesn't help, you can do the following:
Find a way to get the room unique ID somehow. It could be anything - a coordinate, a number, a name, an object, etc. Just be sure it is unique. Once you have it, proceed.
The next mandatory thing you need is a way to get and set the room state. I.e. after getting state you can know that there are three goblins in a room. And setting state would be like "remove all and put these three goblins in this room". These requirements are natural as you are going to read and write the room's content anyway. Once you have it, the rest is easy.
Choose how you will keep the state. Let's say, an Object like {goblins:3, chest:1}. If you kill one goblin, it will become { goblins:2, chest:1 }. If you want to remember just the rooms that are FULLY cleared, then you simply need a boolean variable (true/false) as a state object.
You can store the state Object in a Dictionary as a key-value pair where key is the room's unique ID.
var visited_rooms:Dictionary = new Dictionary();
var roomID = ... // unique room id
var savedState:Object = { goblins:3, chest:1 } // read room state somehow
visited_rooms[roomID] = savedState;
Now, upon leaving the room, you get the state info and put it in the Dictionary.
Once you enter this room again, just check if its unique ID is present in the Dictionary and restore the state if so:
var roomID = ... // unique room id
if (roomID in visited_rooms) {
var savedState:Object = visited_rooms[roomID];
room.setState(savedState);
}
That's basically all.

Whats a good name for a base class for Movie and Episode?

I've been refactoring Media Browser and have started to define a proper inheritance model for our domain objects
so I have
BaseItem
-> Video
--> <Need a name for this>
---> Episode
---> Movie
-> Folder
--> Season
Essentially tv show episodes and movies have some attributes in common (like actor or director listings) so I need a name for this common base class.
I don't want to chuck this in the Video base class, cause thing like mpegs that you record on your camera have no actors or directors so they are simply Videos ...
Any help with a name would be much appreciated..
Production?
Well, in plain English, I've always just called them shows. "Going to see a show at the theater." "Did you catch that show on the History channel?"
I am fairly sure that the TV/cable industry has a term for this since scheduling a channel's lineup for a particular day involves scheduling these X's (feature movies and show episodes). I'm not sure what the term is in English though. I thought it was a program or broadcast, but I think it is more general.
I definitely agree with #Richard but I would suggest you skip the extra level "Video" and replace it with "Shows"... If the main aspect is to keep it user-friendly.
However, I think the main problem is that you are mixing up folder structure (user interface structure) and class inheritance (internal structure).
If it was for the code only you could have something like (example only, the terms may are just made up):
Media (ICollectionItem)
Video
Film
Program
Sound
Sample
Recording
Collection (ICollection)
But you could still show it to the user as:
Shows [Collection]
Film [Film]
Series [Collection]
Episode [Program]
Music [Collection]
Recordings [Collection]
CDS [Recording]
Vinyls [Recording]
Sample Compilations [Collection]
Sample [Sample]
Coming from the television industry the common terminology is usually:
Broadcaster (YTV, Teletoon, etc.)
Series (Ben 10, Total Drama Island, etc.)
Episode (1:Pilot, 2:The Biggest Mistake, 3:Overboard, etc.)
Character
Actor (who played or voiced the character)
Director
etc.
The way I see it, its not such a big deal storing your actors inside the episodes since you can always consolidate them using a method or property on Series to get all the actors. For example:
allActorsInSeries = Series.Actors;
This format can still be applied to feature films since the episodes simply represent the film and its sequels.
Episode and Movie have professional production in common, as opposed to your outside case of personally-produced video. How about ReleaseVideo or CommercialVideo?
MediaItem?
Maybe even swap MediaItem and Video so you can extend it to audio?
What comes to mind:
Distribution (this would allow you to have Professional and Amature too)
Broadcast (not really, but might get you some other thoughts)